From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
Chris Wilson <chris@chris-wilson.co.uk>,
Matthew Auld <matthew.auld@intel.com>
Subject: [Intel-gfx] [PATCH] drm/i915/selftests: Fix some error codes
Date: Mon, 11 Jan 2021 16:02:45 +0300 [thread overview]
Message-ID: <X/xMdcewtft7+QFM@mwanda> (raw)
These error paths return success instead of negative error codes as
intended.
Fixes: c92724de6db1 ("drm/i915/selftests: Try to detect rollback during batchbuffer preemption")
Fixes: 2d19a71ce68f ("drm/i915/selftests: Exercise long preemption chains")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/gpu/drm/i915/gt/selftest_lrc.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
index 95d41c01d0e0..0f9fbae98158 100644
--- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
@@ -2679,8 +2679,10 @@ static int create_gang(struct intel_engine_cs *engine,
goto err_obj;
cs = i915_gem_object_pin_map(obj, I915_MAP_WC);
- if (IS_ERR(cs))
+ if (IS_ERR(cs)) {
+ err = PTR_ERR(cs);
goto err_obj;
+ }
/* Semaphore target: spin until zero */
*cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
@@ -2707,8 +2709,10 @@ static int create_gang(struct intel_engine_cs *engine,
i915_gem_object_unpin_map(obj);
rq = intel_context_create_request(ce);
- if (IS_ERR(rq))
+ if (IS_ERR(rq)) {
+ err = PTR_ERR(rq);
goto err_obj;
+ }
rq->batch = i915_vma_get(vma);
i915_request_get(rq);
@@ -3264,8 +3268,10 @@ static int live_preempt_user(void *arg)
rq = create_gpr_client(engine, global,
NUM_GPR * i * sizeof(u32));
- if (IS_ERR(rq))
+ if (IS_ERR(rq)) {
+ err = PTR_ERR(rq);
goto end_test;
+ }
client[i] = rq;
}
--
2.29.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
Chris Wilson <chris@chris-wilson.co.uk>,
Matthew Auld <matthew.auld@intel.com>
Subject: [PATCH] drm/i915/selftests: Fix some error codes
Date: Mon, 11 Jan 2021 13:02:45 +0000 [thread overview]
Message-ID: <X/xMdcewtft7+QFM@mwanda> (raw)
These error paths return success instead of negative error codes as
intended.
Fixes: c92724de6db1 ("drm/i915/selftests: Try to detect rollback during batchbuffer preemption")
Fixes: 2d19a71ce68f ("drm/i915/selftests: Exercise long preemption chains")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/gpu/drm/i915/gt/selftest_lrc.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
index 95d41c01d0e0..0f9fbae98158 100644
--- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
@@ -2679,8 +2679,10 @@ static int create_gang(struct intel_engine_cs *engine,
goto err_obj;
cs = i915_gem_object_pin_map(obj, I915_MAP_WC);
- if (IS_ERR(cs))
+ if (IS_ERR(cs)) {
+ err = PTR_ERR(cs);
goto err_obj;
+ }
/* Semaphore target: spin until zero */
*cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
@@ -2707,8 +2709,10 @@ static int create_gang(struct intel_engine_cs *engine,
i915_gem_object_unpin_map(obj);
rq = intel_context_create_request(ce);
- if (IS_ERR(rq))
+ if (IS_ERR(rq)) {
+ err = PTR_ERR(rq);
goto err_obj;
+ }
rq->batch = i915_vma_get(vma);
i915_request_get(rq);
@@ -3264,8 +3268,10 @@ static int live_preempt_user(void *arg)
rq = create_gpr_client(engine, global,
NUM_GPR * i * sizeof(u32));
- if (IS_ERR(rq))
+ if (IS_ERR(rq)) {
+ err = PTR_ERR(rq);
goto end_test;
+ }
client[i] = rq;
}
--
2.29.2
next reply other threads:[~2021-01-11 13:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 13:02 Dan Carpenter [this message]
2021-01-11 13:02 ` [PATCH] drm/i915/selftests: Fix some error codes Dan Carpenter
2021-01-11 13:10 ` [Intel-gfx] " Chris Wilson
2021-01-11 13:10 ` Chris Wilson
2021-01-11 14:18 ` [Intel-gfx] [PATCH v2] drm/i915: selftest_lrc: Fix error code in live_preempt_user() Dan Carpenter
2021-01-11 14:18 ` Dan Carpenter
2021-01-11 14:18 ` Dan Carpenter
2021-01-11 15:31 ` [Intel-gfx] " Andi Shyti
2021-01-11 15:31 ` Andi Shyti
2021-01-11 15:31 ` Andi Shyti
2021-01-11 14:52 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/selftests: Fix some error codes (rev2) Patchwork
2021-01-11 14:54 ` Chris Wilson
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=X/xMdcewtft7+QFM@mwanda \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=matthew.auld@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.