diff options
author | Christian König <christian.koenig@amd.com> | 2021-10-18 21:27:55 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-10-19 15:11:26 +0200 |
commit | 13e9e30cafea10dff6bc8d63a38a61249e83fd65 (patch) | |
tree | 17113bb8b9f7c60840eed30f5ad51a4495aff93f /drivers/gpu/drm/scheduler | |
parent | drm/locking: fix __stack_depot_* name conflict (diff) | |
download | linux-13e9e30cafea10dff6bc8d63a38a61249e83fd65.tar.xz linux-13e9e30cafea10dff6bc8d63a38a61249e83fd65.zip |
drm/scheduler: fix drm_sched_job_add_implicit_dependencies
Trivial fix since we now need to grab a reference to the fence we have
added. Previously the dma_resv function where doing that for us.
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 9c2ba265352a ("drm/scheduler: use new iterator in drm_sched_job_add_implicit_dependencies v2")
Link: https://patchwork.freedesktop.org/patch/msgid/20211019112706.27769-1-christian.koenig@amd.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reported-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
References: https://lore.kernel.org/dri-devel/2023306.UmlnhvANQh@archbook/
Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/scheduler')
-rw-r--r-- | drivers/gpu/drm/scheduler/sched_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 5bc5f775abe1..94fe51b3caa2 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -707,6 +707,9 @@ int drm_sched_job_add_implicit_dependencies(struct drm_sched_job *job, ret = drm_sched_job_add_dependency(job, fence); if (ret) return ret; + + /* Make sure to grab an additional ref on the added fence */ + dma_fence_get(fence); } return 0; } |