drm/i915: Use RMW to update chicken bits in gen7_enable_fbc()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 5 Mar 2014 11:05:46 +0000 (13:05 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 5 Mar 2014 20:30:43 +0000 (21:30 +0100)
gen7_enable_fbc() may write to some registers which we've already
touched, so use RMW so that we don't undo any previous updates.

Also note that we implemnt WaFbcAsynchFlipDisableFbcQueue:bdw.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c

index 2cc9de7899b12dbad1db537de6fce303d1f77a80..e8f2d8a7066ee1488669dc160916e47058f73611 100644 (file)
@@ -294,10 +294,13 @@ static void gen7_enable_fbc(struct drm_crtc *crtc)
 
        if (IS_IVYBRIDGE(dev)) {
                /* WaFbcAsynchFlipDisableFbcQueue:ivb */
-               I915_WRITE(ILK_DISPLAY_CHICKEN1, ILK_FBCQ_DIS);
+               I915_WRITE(ILK_DISPLAY_CHICKEN1,
+                          I915_READ(ILK_DISPLAY_CHICKEN1) |
+                          ILK_FBCQ_DIS);
        } else {
-               /* WaFbcAsynchFlipDisableFbcQueue:hsw */
+               /* WaFbcAsynchFlipDisableFbcQueue:hsw,bdw */
                I915_WRITE(HSW_PIPE_SLICE_CHICKEN_1(intel_crtc->pipe),
+                          I915_READ(HSW_PIPE_SLICE_CHICKEN_1(intel_crtc->pipe)) |
                           HSW_BYPASS_FBC_QUEUE);
        }