]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sched: Refactor ring mirror list handling.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Tue, 4 Dec 2018 21:56:14 +0000 (16:56 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Jan 2019 21:15:36 +0000 (16:15 -0500)
commitf3c1dd614d02fe435accfbbbbe7c51a7a117f0b5
tree4a983bae8c0688b62f350c2bafd5a6b5c38fbdf2
parent4bcb8dc46653f9098b799676cbf2d2f47be7ae9c
drm/sched: Refactor ring mirror list handling.

Decauple sched threads stop and start and ring mirror
list handling from the policy of what to do about the
guilty jobs.
When stoppping the sched thread and detaching sched fences
from non signaled HW fenes wait for all signaled HW fences
to complete before rerunning the jobs.

v2: Fix resubmission of guilty job into HW after refactoring.

v4:
Full restart for all the jobs, not only from guilty ring.
Extract karma increase into standalone function.

v5:
Rework waiting for signaled jobs without relying on the job
struct itself as those might already be freed for non 'guilty'
job's schedulers.
Expose karma increase to drivers.

v6:
Use list_for_each_entry_safe_continue and drm_sched_process_job
in case fence already signaled.
Call drm_sched_increase_karma only once for amdgpu and add documentation.

v7:
Wait only for the latest job's fence.

Suggested-by: Christian Koenig <Christian.Koenig@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/etnaviv/etnaviv_sched.c
drivers/gpu/drm/scheduler/sched_main.c
drivers/gpu/drm/v3d/v3d_sched.c
include/drm/gpu_scheduler.h