]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Early exit from semaphore_waits_for for execlist mode.
authorTomas Elf <tomas.elf@intel.com>
Thu, 8 Oct 2015 18:31:33 +0000 (19:31 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 9 Oct 2015 08:22:38 +0000 (10:22 +0200)
commitf7dd07d3ed870d4e703d85ed8abcaff6d3b8e792
tree11342155c9ac4d1484fcef2e0ce1f878942cd2f0
parent9f172c420f0d5dcc3d241c898ccab665b8e991cb
drm/i915: Early exit from semaphore_waits_for for execlist mode.

When submitting semaphores in execlist mode the hang checker crashes in this
function because it is only runnable in ring submission mode. The reason this
is of particular interest to the TDR patch series is because we use semaphores
as a mean to induce hangs during testing (which is the recommended way to
induce hangs for gen8+). It's not clear how this is supposed to work in
execlist mode since:

1. This function requires a ring buffer.

2. Retrieving a ring buffer in execlist mode requires us to retrieve the
corresponding context, which we get from a request.

3. Retieving a request from the hang checker is not straight-forward since that
requires us to grab the struct_mutex in order to synchronize against the
request retirement thread.

4. Grabbing the struct_mutex from the hang checker is nothing that we will do
since that puts us at risk of deadlock since a hung thread might be holding the
struct_mutex already.

Therefore it's not obvious how we're supposed to deal with this. For now, we're
doing an early exit from this function, which avoids any kernel panic situation
when running our own internal TDR ULT.

* v2: (Chris Wilson)
Turned the execlist mode check into a ringbuffer NULL check to make it more
submission mode agnostic and less of a layering violation.

Signed-off-by: Tomas Elf <tomas.elf@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c