summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_lrc.c
diff options
context:
space:
mode:
authorChris Wilson2018-05-22 12:19:37 +0200
committerChris Wilson2018-05-25 14:39:49 +0200
commitfe25f3048322f32131a151ebe213f52821322f9c (patch)
tree4ff11df5ed087d4138748f924535907c630fcb7e /drivers/gpu/drm/i915/intel_lrc.c
parentdrm/i915: Flush the ring stop bit after clearing RING_HEAD in reset (diff)
downloadkernel-qcow2-linux-fe25f3048322f32131a151ebe213f52821322f9c.tar.gz
kernel-qcow2-linux-fe25f3048322f32131a151ebe213f52821322f9c.tar.xz
kernel-qcow2-linux-fe25f3048322f32131a151ebe213f52821322f9c.zip
drm/i915/execlists: Wait for ELSP submission on restart
After a reset, we will ensure that there is at least one request submitted to HW to ensure that a context is loaded for powersaving. Let's wait for this submission via a tasklet to complete before we drop our forcewake, ensuring the system is ready for rc6 before we let it possibly sleep. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20180522101937.7738-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 302af60415a3..4bcd3206991d 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -2008,7 +2008,16 @@ static void execlists_reset(struct intel_engine_cs *engine,
static void execlists_reset_finish(struct intel_engine_cs *engine)
{
- tasklet_enable(&engine->execlists.tasklet);
+ /*
+ * Flush the tasklet while we still have the forcewake to be sure
+ * that it is not allowed to sleep before we restart and reload a
+ * context.
+ *
+ * As before (with execlists_reset_prepare) we rely on the caller
+ * serialising multiple attempts to reset so that we know that we
+ * are the only one manipulating tasklet state.
+ */
+ __tasklet_enable_sync_once(&engine->execlists.tasklet);
GEM_TRACE("%s\n", engine->name);
}