summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorOscar Mateo2014-07-24 18:04:42 +0200
committerDaniel Vetter2014-08-20 17:17:48 +0200
commitcc9130be805d955f0e06642e57741dd9df1fbc86 (patch)
tree2dda86458c8bf1c1e84eaf4af82ff7e9f5e5582e /drivers/gpu/drm/i915/i915_gem.c
parentdrm/i915/bdw: Don't write PDP in the legacy way when using LRCs (diff)
downloadkernel-qcow2-linux-cc9130be805d955f0e06642e57741dd9df1fbc86.tar.gz
kernel-qcow2-linux-cc9130be805d955f0e06642e57741dd9df1fbc86.tar.xz
kernel-qcow2-linux-cc9130be805d955f0e06642e57741dd9df1fbc86.zip
drm/i915/bdw: Make sure gpu reset still works with Execlists
If we reset a ring after a hang, we have to make sure that we clear out all queued Execlists requests. v2: The ring is, at this point, already being correctly re-programmed for Execlists, and the hangcheck counters cleared. v3: Daniel suggests to drop the "if (execlists)" because the Execlists queue should be empty in legacy mode (which is true, if we do the INIT_LIST_HEAD). v4: Do the pending intel_runtime_pm_put Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 32fa1e9eb844..aa4103bdd352 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2551,6 +2551,18 @@ static void i915_gem_reset_ring_cleanup(struct drm_i915_private *dev_priv,
i915_gem_free_request(request);
}
+ while (!list_empty(&ring->execlist_queue)) {
+ struct intel_ctx_submit_request *submit_req;
+
+ submit_req = list_first_entry(&ring->execlist_queue,
+ struct intel_ctx_submit_request,
+ execlist_link);
+ list_del(&submit_req->execlist_link);
+ intel_runtime_pm_put(dev_priv);
+ i915_gem_context_unreference(submit_req->ctx);
+ kfree(submit_req);
+ }
+
/* These may not have been flush before the reset, do so now */
kfree(ring->preallocated_lazy_request);
ring->preallocated_lazy_request = NULL;