drm/i915/chv: Add cursor pipe offsets
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 9 Apr 2014 10:28:53 +0000 (13:28 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 20 May 2014 13:32:30 +0000 (15:32 +0200)
Unsurprisingly the cursor C regiters are also at a weird offset on CHV.
Add more pipe offsets to handle them.

This also gets rid of most of the differences between the i9xx vs. ivb
cursor code. We can unify the remaining code as well, but I'll leave
that for another patch.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Antti Koskipää <antti.koskipaa@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c

index 6764ac8..16bbdc7 100644 (file)
@@ -2304,10 +2304,8 @@ static bool cursor_active(struct drm_device *dev, int pipe)
 
        if (IS_845G(dev) || IS_I865G(dev))
                state = I915_READ(_CURACNTR) & CURSOR_ENABLE;
-       else if (INTEL_INFO(dev)->gen <= 6 || IS_VALLEYVIEW(dev))
-               state = I915_READ(CURCNTR(pipe)) & CURSOR_MODE;
        else
-               state = I915_READ(CURCNTR_IVB(pipe)) & CURSOR_MODE;
+               state = I915_READ(CURCNTR(pipe)) & CURSOR_MODE;
 
        return state;
 }
@@ -2317,10 +2315,7 @@ static bool cursor_position(struct drm_device *dev, int pipe, int *x, int *y)
        struct drm_i915_private *dev_priv = dev->dev_private;
        u32 pos;
 
-       if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev) || IS_BROADWELL(dev))
-               pos = I915_READ(CURPOS_IVB(pipe));
-       else
-               pos = I915_READ(CURPOS(pipe));
+       pos = I915_READ(CURPOS(pipe));
 
        *x = (pos >> CURSOR_X_SHIFT) & CURSOR_POS_MASK;
        if (pos & (CURSOR_POS_SIGN << CURSOR_X_SHIFT))
Simple merge
Simple merge
Simple merge
Simple merge