diff options
author | Christian König <christian.koenig@amd.com> | 2018-07-26 13:43:49 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-07-31 23:58:20 +0200 |
commit | 43bce41cf48eb51eab5ad9e0d40ed382a7bb61d7 (patch) | |
tree | 2a394bbe837c5ff95ec29a4c483f179ccfcc56e4 /include/drm/gpu_scheduler.h | |
parent | drm/amdgpu: create an empty bo_list if no handle is provided (diff) | |
download | linux-43bce41cf48eb51eab5ad9e0d40ed382a7bb61d7.tar.xz linux-43bce41cf48eb51eab5ad9e0d40ed382a7bb61d7.zip |
drm/scheduler: only kill entity if last user is killed v2
Note which task is using the entity and only kill it if the last user of
the entity is killed. This should prevent problems when entities are leaked to
child processes.
v2: add missing kernel doc
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/gpu_scheduler.h')
-rw-r--r-- | include/drm/gpu_scheduler.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h index 091b9afcd184..21c648b0b2a1 100644 --- a/include/drm/gpu_scheduler.h +++ b/include/drm/gpu_scheduler.h @@ -66,6 +66,7 @@ enum drm_sched_priority { * @guilty: points to ctx's guilty. * @fini_status: contains the exit status in case the process was signalled. * @last_scheduled: points to the finished fence of the last scheduled job. + * @last_user: last group leader pushing a job into the entity. * * Entities will emit jobs in order to their corresponding hardware * ring, and the scheduler will alternate between entities based on @@ -85,6 +86,7 @@ struct drm_sched_entity { struct dma_fence_cb cb; atomic_t *guilty; struct dma_fence *last_scheduled; + struct task_struct *last_user; }; /** |