|
@@ -347,6 +347,10 @@ void i915_gem_context_reset(struct drm_device *dev)
|
|
|
i915_gem_context_unreference(lctx);
|
|
|
ring->last_context = NULL;
|
|
|
}
|
|
|
+
|
|
|
+ /* Force the GPU state to be reinitialised on enabling */
|
|
|
+ if (ring->default_context)
|
|
|
+ ring->default_context->legacy_hw_ctx.initialized = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -715,7 +719,7 @@ static int do_switch(struct drm_i915_gem_request *req)
|
|
|
if (ret)
|
|
|
goto unpin_out;
|
|
|
|
|
|
- if (!to->legacy_hw_ctx.initialized) {
|
|
|
+ if (!to->legacy_hw_ctx.initialized || i915_gem_context_is_default(to)) {
|
|
|
hw_flags |= MI_RESTORE_INHIBIT;
|
|
|
/* NB: If we inhibit the restore, the context is not allowed to
|
|
|
* die because future work may end up depending on valid address
|