summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_context.c
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2012-06-17 09:37:24 -0700
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-06-18 10:01:08 +0200
commite158c5aa1776372cd751e2c395300a3a6ff0bc9c (patch)
tree083efc56e4f3690917d5660cad008346207d93ec /drivers/gpu/drm/i915/i915_gem_context.c
parent39fb50f6178d7dbd70142b25193d722ebf3f8193 (diff)
downloadlinux-e158c5aa1776372cd751e2c395300a3a6ff0bc9c.tar.gz
linux-e158c5aa1776372cd751e2c395300a3a6ff0bc9c.tar.bz2
linux-e158c5aa1776372cd751e2c395300a3a6ff0bc9c.zip
drm/i915: disable contexts on old HW
This got dropped as a result of the last round of comments. I didn't test it on unsupported HW (which this is likely the case). Note that this prevents hw context from blowing up on any pre-gen6 hw. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51142 [danvet: Added note and buglink.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_context.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 6dc426a48b2d..8fb8cd8f6320 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -243,8 +243,10 @@ void i915_gem_context_init(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t ctx_size;
- if (!HAS_HW_CONTEXTS(dev))
+ if (!HAS_HW_CONTEXTS(dev)) {
+ dev_priv->hw_contexts_disabled = true;
return;
+ }
/* If called from reset, or thaw... we've been here already */
if (dev_priv->hw_contexts_disabled ||