]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Apply a mb between emitting the request and hangcheck
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 7 Apr 2016 06:29:17 +0000 (07:29 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Apr 2016 10:44:48 +0000 (11:44 +0100)
commit43df002db9b15dbd1fbcce7c2d1922ae4963ff07
tree5b924c17a0ecd9af5e7f907e0961f6b392398783
parentb03b885d6beb25d7aa2a51a3b9aa103ddceac9fe
drm/i915: Apply a mb between emitting the request and hangcheck

Seal the request and mark it as pending execution before we submit it to
hardware. We assume that the actual submission cannot fail (that
guarantee is provided by preallocating space in the request for the
submission). As we may inspect this state without holding any locks
during hangcheck we should apply a barrier to ensure that we do
not see a more recent value in the HWS than we are tracking.

Based on a patch by Mika Kuoppala.

Suggested-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460010558-10705-8-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_irq.c