aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-09-14 04:00:16 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2018-09-14 06:55:00 -0400
commit22495b68f954c9018fd52bc620292cc80df2e418 (patch)
tree8f35781908e1da93bf9dc106ec487690e57eb5f0 /drivers/gpu/drm
parent11abf0c5a021af683b8fe12b0d30fb1226d60e0f (diff)
drm/i915: Flush the tasklet when checking for idle
In order to reduce latency when checking for idle we kick the tasklet directly. Sometimes this is not enough as it is queued on another cpu and so to improve the accuracy of this idle-check (and so to reduce latency overall by avoiding another pass, or worse declaring a timeout!) wait for the tasklet to complete. References: https://bugs.freedesktop.org/show_bug.cgi?id=107916 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180914080017.30308-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_engine_cs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index 10cd051ba29e..217ed3ee1cab 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -990,6 +990,9 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
990 } 990 }
991 local_bh_enable(); 991 local_bh_enable();
992 992
993 /* Otherwise flush the tasklet if it was on another cpu */
994 tasklet_unlock_wait(t);
995
993 if (READ_ONCE(engine->execlists.active)) 996 if (READ_ONCE(engine->execlists.active))
994 return false; 997 return false;
995 } 998 }