|
Jessica Yu |
3c1500 |
From 76c5399fe2e4d7a5013280629de05c8ab6301311 Mon Sep 17 00:00:00 2001
|
|
Jessica Yu |
3c1500 |
From: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Jessica Yu |
3c1500 |
Date: Mon, 29 Jul 2019 09:59:44 +0100
|
|
Jessica Yu |
3c1500 |
Subject: drm/i915/selftests: Careful not to flush hang_fini on error setups
|
|
Jessica Yu |
3c1500 |
Git-commit: 76c5399fe2e4d7a5013280629de05c8ab6301311
|
|
Jessica Yu |
3c1500 |
Patch-mainline: v5.4-rc1
|
|
Jessica Yu |
3c1500 |
References: bsc#1152489
|
|
Jessica Yu |
3c1500 |
|
|
Jessica Yu |
3c1500 |
Smatch spotted that we test at the start of hang_fini for a valid (h->gt
|
|
Jessica Yu |
3c1500 |
is only set after a request is created) but then used it regardless
|
|
Jessica Yu |
3c1500 |
later on.
|
|
Jessica Yu |
3c1500 |
|
|
Jessica Yu |
3c1500 |
v2: Alternatively, we do not need to check as we now always prime h->gt
|
|
Jessica Yu |
3c1500 |
in hang_init()
|
|
Jessica Yu |
3c1500 |
|
|
Jessica Yu |
3c1500 |
References: cb823ed9915b ("drm/i915/gt: Use intel_gt as the primary object for handling resets")
|
|
Jessica Yu |
3c1500 |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Jessica Yu |
3c1500 |
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Jessica Yu |
3c1500 |
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
|
|
Jessica Yu |
3c1500 |
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Jessica Yu |
3c1500 |
Link: https://patchwork.freedesktop.org/patch/msgid/20190729085944.2179-1-chris@chris-wilson.co.uk
|
|
Jessica Yu |
3c1500 |
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
|
|
Jessica Yu |
3c1500 |
---
|
|
Jessica Yu |
3c1500 |
drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 4 +---
|
|
Jessica Yu |
3c1500 |
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
Jessica Yu |
3c1500 |
|
|
Jessica Yu |
3c1500 |
diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
|
|
Jessica Yu |
3c1500 |
index e2fa38a1ff0f..4484b4447db1 100644
|
|
Jessica Yu |
3c1500 |
--- a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
|
|
Jessica Yu |
3c1500 |
+++ b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
|
|
Jessica Yu |
3c1500 |
@@ -272,9 +272,7 @@ static u32 hws_seqno(const struct hang *h, const struct i915_request *rq)
|
|
Jessica Yu |
3c1500 |
static void hang_fini(struct hang *h)
|
|
Jessica Yu |
3c1500 |
{
|
|
Jessica Yu |
3c1500 |
*h->batch = MI_BATCH_BUFFER_END;
|
|
Jessica Yu |
3c1500 |
-
|
|
Jessica Yu |
3c1500 |
- if (h->gt)
|
|
Jessica Yu |
3c1500 |
- intel_gt_chipset_flush(h->gt);
|
|
Jessica Yu |
3c1500 |
+ intel_gt_chipset_flush(h->gt);
|
|
Jessica Yu |
3c1500 |
|
|
Jessica Yu |
3c1500 |
i915_gem_object_unpin_map(h->obj);
|
|
Jessica Yu |
3c1500 |
i915_gem_object_put(h->obj);
|
|
Jessica Yu |
3c1500 |
--
|
|
Jessica Yu |
3c1500 |
2.28.0
|
|
Jessica Yu |
3c1500 |
|