]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: move amdgpu_ctx_mgr_entity_fini to f_ops flush hook (V4)
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 30 May 2018 19:28:52 +0000 (15:28 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jun 2018 17:20:33 +0000 (12:20 -0500)
commit82789b415022f9cae4d87c529207642d1a762caa
treeff89a29b752a9a06c7003f8ccd93cc82debf8e8f
parent55489647f73fb751a38c6b3c0c566e0ab8e4fff9
drm/amdgpu: move amdgpu_ctx_mgr_entity_fini to f_ops flush hook (V4)

With this we can now terminate jobs enqueue into SW queue the moment
the task is being killed instead of waiting for last user of
drm file to release it.

Also stop checking for kref_read(&ctx->refcount) == 1 when
calling drm_sched_entity_do_release since other task
might still hold a reference to this entity but we don't
care since KILL means terminate job submission regardless
of what other tasks are doing.

v2:
Use returned remaining timeout as parameter for the next call.
Rebase.

v3:
Switch to working with jiffies.
Streamline remainder TO usage.
Rebase.

v4:
Rebase.

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_ctx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c