drm/i915: Clean up multi-threaded forcewake patch
authorKeith Packard <keithp@keithp.com>
Fri, 9 Dec 2011 19:33:00 +0000 (11:33 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:50 +0000 (13:34 +0000)
commitb3391c0f17574392ed04bca6a9148748c006d10c
treefd799fd3d4f43ee282002d66133918f1efefeb57
parentbc4056f4efd3fee2f89579023aa4bd714beb4131
drm/i915: Clean up multi-threaded forcewake patch

commit c7dffff7cc8de748edf0e9f6571cdabecb198705 upstream.

We learned that the ECOBUS register was inside the GT power well, and
so *did* need force wake to be read, so it gets removed from the list
of 'doesn't need force wake' registers.

That means the code reading ECOBUS after forcing the mt_force_wake
function to be called needs to use I915_READ_NOTRACE; it doesn't need
to do more force wake fun as it's already done it manually.

This also adds a comment explaining why the MT forcewake testing code
only needs to call mt_forcewake_get/put and not disable RC6 manually
-- the ECOBUS read will return 0 if the device is in RC6 and isn't
using MT forcewake, causing the test to work correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
[bwh: Backported to 3.2: I previously backported a change to
 NEEDS_FORCE_WAKE() and applied it to the version in i915_drv.c, the one
 that was actually being used.  Move that change to i915_drv.h now.]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c