From: Li Zhong <floridsleeves@gmail.com>
To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org
Cc: airlied@linux.ie, sumit.semwal@linaro.org,
Li Zhong <floridsleeves@gmail.com>,
daniel@ffwll.ch, rodrigo.vivi@intel.com, airlied@redhat.com,
christian.koenig@amd.com
Subject: [Intel-gfx] [PATCH v1] drivers/gpu/drm/i915/gt: Check the return value of i915_active_acquire()
Date: Sun, 18 Sep 2022 15:07:31 -0700 [thread overview]
Message-ID: <20220918220731.1026200-1-floridsleeves@gmail.com> (raw)
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
next reply other threads:[~2022-09-19 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-18 22:07 Li Zhong [this message]
2022-09-19 8:34 ` [Intel-gfx] [PATCH v1] drivers/gpu/drm/i915/gt: Check the return value of i915_active_acquire() 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220918220731.1026200-1-floridsleeves@gmail.com \
--to=floridsleeves@gmail.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox