Skip to contentSkip to conversation

drm/i915: disable contexts on old HW

PATCH Applied Ben Widawsky 2 participants 2 messages Jun 17, 2012 – Jun 18, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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).

---
 drivers/gpu/drm/i915/i915_gem_context.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_context.c +3 -1
index 6dc426a..8fb8cd8 100644
@@ -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 ||
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · Ben Widawsky

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).

Queued for -next, thanks for the patch.
-Daniel

Quoted 23 lines
---
 drivers/gpu/drm/i915/i915_gem_context.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_context.c +3 -1
index 6dc426a..8fb8cd8 100644
@@ -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 ||
Signature · 1 line
1.7.10.4
Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48