[Intel-gfx] [PATCH] drm/i915: Don't scream if there's no context for reset stats
Daniel Vetter
daniel.vetter at ffwll.ch
Mon Mar 10 09:44:22 CET 2014
It can happen ...
Fix up the check to match pre-gen6 reality where we don't have hw
contexts and hence also don't need to set the reset status on them.
This blows up when running any gpu reset testcase since for pre-gen6
request->ctx is NULL. With this my ilk here is happy again.
This regression has been introduced in
commit 44e2c0705a19e09d7b0f30a591f92e473e5ef89e
Author: Mika Kuoppala <mika.kuoppala at linux.intel.com>
Date: Thu Jan 30 16:01:15 2014 +0200
drm/i915: Use i915_hw_context to set reset stats
Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
Cc: Ben Widawsky <ben at bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 92b0b4164b1d..25cc3f4f242e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2291,8 +2291,10 @@ static void i915_set_reset_status(struct drm_i915_private *dev_priv,
{
struct i915_ctx_hang_stats *hs;
- if (WARN_ON(!ctx))
+ if (!ctx) {
+ WARN_ON(HAS_HW_CONTEXTS(dev_priv->dev));
return;
+ }
hs = &ctx->hang_stats;
--
1.8.1.4
More information about the Intel-gfx
mailing list