]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Skip execlists_dequeue() early if the list is empty
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Mar 2017 12:07:16 +0000 (12:07 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Mar 2017 15:53:26 +0000 (15:53 +0000)
commit14f7c9c4d03487b3f81975751c40e5ee267a3537
treea538bf1633203056fb63bd4acaf889ef8b539db1
parenteea85048b5dca63a2c4aba412e05eff8fa3f00f6
drm/i915: Skip execlists_dequeue() early if the list is empty

Do an early read of the execlists' queue before we take the spinlock and
start checking. This is safe as the first writer to the execlists queue
will cause the tasklet to be run again after a memory barrier.

v2: Keep guc in sync with execlists queue changes
v3: Explain the mb between the tasklet running on one cpu and the
execlist_first update and schedule from a second cpu.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170317120716.17191-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_guc_submission.c
drivers/gpu/drm/i915/intel_lrc.c