OSDN Git Service

drm/amdkfd: Simplify eviction state logic
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 1 May 2019 22:20:13 +0000 (18:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jun 2019 16:57:45 +0000 (11:57 -0500)
commitbb2d2128a54c48355249b56cbc898a89e76ba7a1
treeb4616770231c35e02518beb5e324a8a555da6dc5
parent052af915d826b33588749566145c9417fcfc7246
drm/amdkfd: Simplify eviction state logic

Always mark evicted queues with q->properties.is_evicted = true, even
queues that are inactive for other reason. This simplifies maintaining
the eviction state as it doesn't require updating is_evicted when other
queue activation conditions change.

On the other hand, we now need to check those other queue activation
conditions whenever an evicted queues is restored. To minimize code
duplication, move the queue activation check into a macro so it can be
maintained in one central place.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Philip Cox <Philip.Cox@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h