summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_lrc.c
diff options
context:
space:
mode:
authorChris Wilson2018-02-15 17:25:53 +0100
committerChris Wilson2018-02-16 15:14:14 +0100
commit339ccd35b42cb679b1a218fdbac4c029058c671c (patch)
tree35707a8635c86fa1d93356107fa8483e556b50ff /drivers/gpu/drm/i915/intel_lrc.c
parentdrm: move read_domains and write_domain into i915 (diff)
downloadkernel-qcow2-linux-339ccd35b42cb679b1a218fdbac4c029058c671c.tar.gz
kernel-qcow2-linux-339ccd35b42cb679b1a218fdbac4c029058c671c.tar.xz
kernel-qcow2-linux-339ccd35b42cb679b1a218fdbac4c029058c671c.zip
drm/i915: Assert that we always complete a submission to guc/execlists
The continual resubmission model for execlists (and emulated over guc) requires that we keep feeding requests into the HW in order to generate more CS interrupts to drain the rest of the queue. Add a couple of asserts to ensure that we don't skip a cycle and come to a grinding halt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: MichaƂ Winiarski <michal.winiarski@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180215162553.23348-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index c2c8380a0121..6fbe1a8a37ad 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -642,6 +642,12 @@ done:
execlists->first = rb;
if (submit)
port_assign(port, last);
+
+ /* We must always keep the beast fed if we have work piled up */
+ GEM_BUG_ON(port_isset(execlists->port) &&
+ !execlists_is_active(execlists, EXECLISTS_ACTIVE_USER));
+ GEM_BUG_ON(execlists->first && !port_isset(execlists->port));
+
unlock:
spin_unlock_irq(&engine->timeline->lock);