@@ -252,7 +252,7 @@ int gen8_gem_context_init(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_engine *ring;
- int ret = -ENOSYS, ring_id;
+ int ret, ring_id;
dev_priv->hw_context_size = round_up(GEN8_LR_CONTEXT_SIZE, 4096);
@@ -265,8 +265,17 @@ int gen8_gem_context_init(struct drm_device *dev)
ring->default_context = NULL;
goto err_out;
}
+
+ I915_WRITE(RING_MODE_GEN7(ring),
+ _MASKED_BIT_DISABLE(GFX_REPLAY_MODE) |
+ _MASKED_BIT_ENABLE(GFX_RUN_LIST_ENABLE));
+ POSTING_READ(RING_MODE_GEN7(ring));
+
+ DRM_DEBUG_DRIVER("Enabled default logical ring context for %s\n", ring->name);
}
+ return 0;
+
err_out:
gen8_gem_context_fini(dev);
return ret;