drm/i915: Reorder semaphore deadlock check
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Jun 2014 09:22:29 +0000 (10:22 +0100)
committerJani Nikula <jani.nikula@intel.com>
Wed, 11 Jun 2014 08:06:43 +0000 (11:06 +0300)
commit4be173813e57c7298103a83155c2391b5b167b4c
tree594dce46be8caef7687d138cfc21ef580da6f01d
parenteee73b46261325eb140d899b5371f49b02d88f63
drm/i915: Reorder semaphore deadlock check

If a semaphore is waiting on another ring, which in turn happens to be
waiting on the first ring, but that second semaphore has been signalled,
we will be able to kick the second ring and so can treat the first ring
as a valid WAIT and not as HUNG.

v2: Be paranoid and cap the potential recursion depth whilst visiting
the semaphore signallers. (Mika)

References: https://bugs.freedesktop.org/show_bug.cgi?id=54226
References: https://bugs.freedesktop.org/show_bug.cgi?id=75502
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_ringbuffer.h