From bfd90a64e7e38a0ce3e6f514fcb7ea90e1220685 Mon Sep 17 00:00:00 2001 From: Mika Kuoppala Date: Mon, 17 Jun 2013 16:46:51 +0300 Subject: [PATCH 1/1] drm/i915: fix context hang stats when contexts are disabled Don't check if context is banned when contexts are disabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65845 Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index ff47145..4550b28 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -313,7 +313,7 @@ i915_gem_context_get_hang_stats(struct intel_ring_buffer *ring, struct i915_hw_context *to; if (dev_priv->hw_contexts_disabled) - return ERR_PTR(-ENOENT); + return NULL; if (ring->id != RCS) return ERR_PTR(-EINVAL); diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 7fcd6c0..1a9c5a3 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1041,7 +1041,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, goto err; } - if (hs->banned) { + if (hs && hs->banned) { ret = -EIO; goto err; } -- 1.7.9.5