dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/scheduler: fix drm_sched_job_add_implicit_dependencies
@ 2021-11-16  9:25 Christian König
  2021-11-16  9:25 ` [PATCH 2/2] drm/sched: fix dropping the last fence ref Christian König
  0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2021-11-16  9:25 UTC (permalink / raw)
  To: dri-devel, robdclark, daniel, frattaroli.nicolas, y.oudjana

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>
Tested-by: Yassine Oudjana <y.oudjana@protonmail.com>
---
 drivers/gpu/drm/scheduler/sched_main.c | 3 +++
 1 file changed, 3 insertions(+)

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;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-17  6:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-16  9:25 [PATCH 1/2] drm/scheduler: fix drm_sched_job_add_implicit_dependencies Christian König
2021-11-16  9:25 ` [PATCH 2/2] drm/sched: fix dropping the last fence ref Christian König
2021-11-16 16:37   ` Daniel Vetter
2021-11-16 18:07     ` Rob Clark
2021-11-17  6:17       ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox