@@ -2813,9 +2813,12 @@ int i915_gpu_idle(struct drm_device *dev)
/* Flush everything onto the inactive list. */
for_each_active_ring(ring, dev_priv, i) {
- ret = i915_switch_context(ring, ring->default_context);
- if (ret)
- return ret;
+ if (!dev_priv->lrc_enabled) {
+ ret = i915_switch_context(ring,
+ ring->default_context);
+ if (ret)
+ return ret;
+ }
ret = intel_ring_idle(ring);
if (ret)
@@ -532,10 +532,12 @@ int i915_gem_context_enable(struct drm_i915_private *dev_priv)
BUG_ON(!dev_priv->ring[RCS].default_context);
- for_each_active_ring(ring, dev_priv, i) {
- ret = i915_switch_context(ring, ring->default_context);
- if (ret)
- return ret;
+ if (!dev_priv->lrc_enabled) {
+ for_each_active_ring(ring, dev_priv, i) {
+ ret = i915_switch_context(ring, ring->default_context);
+ if (ret)
+ return ret;
+ }
}
return 0;
@@ -1288,9 +1288,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
if (ret)
goto err;
- ret = i915_switch_context(ring, ctx);
- if (ret)
- goto err;
+ if (!dev_priv->lrc_enabled) {
+ ret = i915_switch_context(ring, ctx);
+ if (ret)
+ goto err;
+ }
if (ring == &dev_priv->ring[RCS] &&
mode != dev_priv->relative_constants_mode) {
@@ -433,7 +433,10 @@ static void ring_write_tail(struct intel_engine *ring,
static void gen8_submit_ctx(struct intel_engine *ring,
struct i915_hw_context *ctx, u32 value)
{
- DRM_ERROR("Execlists still not ready!\n");
+ if (WARN_ON(ctx == NULL))
+ ctx = ring->default_context;
+
+ gen8_switch_context_queue(ring, ctx, value);
}
u64 intel_ring_get_active_head(struct intel_engine *ring)