]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Read FORCEWAKE registers with I915_READ_FW()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 22 Oct 2015 12:34:57 +0000 (15:34 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 26 Oct 2015 14:28:21 +0000 (16:28 +0200)
commit04a503fab85a8d99187d9a2886065df861d3134b
treeaa771c07b0b7e8a1110e2ce8cc2c70c8a3cec443
parent33a7c6130a512c652197432c60f4181facde53c1
drm/i915: Read FORCEWAKE registers with I915_READ_FW()

Change FORCEWAKE & co. reads for the error state to use I915_READ_FW().
Reading a FORCEWAKE register using a function that can frob forcewake
just seems wrong.

There is a check to skip grabbing the forcewake for accessing FORCEWAKE
in intel_uncore.c, but there's no such check for FORCEWAKE_MT. So no
idea what is currently happening with FORCEWAKE_MT reads. FORCEWAKE_VLV
is fortunately outside the forcewake range anyway, so no actual issue
with that one.

So let's just make the rule that you can't access FORCEWAKE registers with
the normal I915_READ() stuff, and we can drop the extra FORCEWAKE check
from NEEDS_FORCEWAKE(). While at it use NEEDS_FORCEWAKE() on BDW, where
it was skipped for whatever bikeshed reason that I've already forgotten.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1445517300-28173-3-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/intel_uncore.c