Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v1] drivers/gpu/drm/i915/gt: Check the return value of i915_active_acquire()
@ 2022-09-18 22:07 Li Zhong
  2022-09-19  8:34 ` Jani Nikula
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Li Zhong @ 2022-09-18 22:07 UTC (permalink / raw)
  To: linux-kernel, linux-media, linaro-mm-sig, dri-devel, intel-gfx
  Cc: airlied, sumit.semwal, Li Zhong, daniel, rodrigo.vivi, airlied,
	christian.koenig

i915_active_acquire() could return error when the acquire fails. Check
and return the error code.

Signed-off-by: Li Zhong <floridsleeves@gmail.com>
---
 drivers/gpu/drm/i915/gt/intel_timeline.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c
index b9640212d659..d8333ab64574 100644
--- a/drivers/gpu/drm/i915/gt/intel_timeline.c
+++ b/drivers/gpu/drm/i915/gt/intel_timeline.c
@@ -211,7 +211,10 @@ int intel_timeline_pin(struct intel_timeline *tl, struct i915_gem_ww_ctx *ww)
 	GT_TRACE(tl->gt, "timeline:%llx using HWSP offset:%x\n",
 		 tl->fence_context, tl->hwsp_offset);
 
-	i915_active_acquire(&tl->active);
+	err = i915_active_acquire(&tl->active);
+	if (err)
+		return err;
+
 	if (atomic_fetch_inc(&tl->pin_count)) {
 		i915_active_release(&tl->active);
 		__i915_vma_unpin(tl->hwsp_ggtt);
-- 
2.25.1


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

end of thread, other threads:[~2022-09-20  1:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-18 22:07 [Intel-gfx] [PATCH v1] drivers/gpu/drm/i915/gt: Check the return value of i915_active_acquire() Li Zhong
2022-09-19  8:34 ` Jani Nikula
2022-09-19 19:25 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2022-09-19 19:25 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2022-09-19 19:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-20  1:59 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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