drm/i915: Parametrize FBC_TAG registers
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 Sep 2015 17:03:18 +0000 (20:03 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 Sep 2015 15:14:53 +0000 (17:14 +0200)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_fbc.c

index 90ce688696c7c72d10fcf838aa3ba590b1e6ae32..ffd0f6b074701de0735e0ccb2031c2ded3e7f247 100644 (file)
@@ -2011,7 +2011,7 @@ enum skl_disp_power_wells {
 #define   FBC_CTL_CPU_FENCE    (1<<1)
 #define   FBC_CTL_PLANE(plane) ((plane)<<0)
 #define FBC_FENCE_OFF          0x03218 /* BSpec typo has 321Bh */
-#define FBC_TAG                        0x03300
+#define FBC_TAG(i)             (0x03300 + (i) * 4)
 
 #define FBC_STATUS2            0x43214
 #define  FBC_COMPRESSION_MASK  0x7ff
index d38f46433bcd09a672a93b86183cb120977d5b6c..6777fbb25d07d341d7a16e07bea4e5dfa36d0b1f 100644 (file)
@@ -101,7 +101,7 @@ static void i8xx_fbc_enable(struct intel_crtc *crtc)
 
        /* Clear old tags */
        for (i = 0; i < (FBC_LL_SIZE / 32) + 1; i++)
-               I915_WRITE(FBC_TAG + (i * 4), 0);
+               I915_WRITE(FBC_TAG(i), 0);
 
        if (IS_GEN4(dev_priv)) {
                u32 fbc_ctl2;