[Intel-gfx] [PATCH] drm/i915: protect force_wake_(get|put) with the gt_lock
Chris Wilson
chris at chris-wilson.co.uk
Sun Nov 6 12:57:55 CET 2011
On Sun, 6 Nov 2011 12:31:34 +0100, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> We don't have any read in a fastpath that needs forcewake, so I've
> decided to not care much about overhead.
>
> This prevents tests/gem_hangcheck_forcewake from i-g-t from killing my
> snb on recent kernels - something must have slightly changed the
> timings.
Almost there. You just haven't explained the rationale for *this* patch,
which is that hangcheck needs to acquire the forcewake in order to read
the registers and hangcheck must not take the struct_mutex (or else
deadlock with wait_request and a hung GPU).
So there is a choice here: introduce a new locking rule for forcewake,
or use the existing struct_mutex inside hangcheck and therefore drop the
mutex for wait_request. The first definitely feels safer than dropping
struct_mutex on waits, and I haven't thought of any tangible benefits
for doing so (other than concurrent clients might see an improvement).
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list