Commit d9d82081 authored by Paulo Zanoni's avatar Paulo Zanoni Committed by Jani Nikula

drm/i915: fix assert_cursor on BDW

We need to read the correct register, not a register that doesn't exist
and will trigger "Unclaimed register" messages when we touch it.

Also rearrange the checks in an attempt to prevent this error from
happening again.
Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
[Jani: dropped an extra empty line introduced.]
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 17b0c1f7
...@@ -1092,12 +1092,12 @@ static void assert_cursor(struct drm_i915_private *dev_priv, ...@@ -1092,12 +1092,12 @@ static void assert_cursor(struct drm_i915_private *dev_priv,
struct drm_device *dev = dev_priv->dev; struct drm_device *dev = dev_priv->dev;
bool cur_state; bool cur_state;
if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) if (IS_845G(dev) || IS_I865G(dev))
cur_state = I915_READ(CURCNTR_IVB(pipe)) & CURSOR_MODE;
else if (IS_845G(dev) || IS_I865G(dev))
cur_state = I915_READ(_CURACNTR) & CURSOR_ENABLE; cur_state = I915_READ(_CURACNTR) & CURSOR_ENABLE;
else else if (INTEL_INFO(dev)->gen <= 6 || IS_VALLEYVIEW(dev))
cur_state = I915_READ(CURCNTR(pipe)) & CURSOR_MODE; cur_state = I915_READ(CURCNTR(pipe)) & CURSOR_MODE;
else
cur_state = I915_READ(CURCNTR_IVB(pipe)) & CURSOR_MODE;
WARN(cur_state != state, WARN(cur_state != state,
"cursor on pipe %c assertion failure (expected %s, current %s)\n", "cursor on pipe %c assertion failure (expected %s, current %s)\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment