@@ -132,8 +132,7 @@ static void i8xx_fbc_activate(struct drm_i915_private *dev_priv)
132
132
}
133
133
134
134
/* enable it... */
135
- fbc_ctl = intel_de_read (dev_priv , FBC_CONTROL );
136
- fbc_ctl &= FBC_CTL_INTERVAL (0x3fff );
135
+ fbc_ctl = FBC_CTL_INTERVAL (params -> interval );
137
136
fbc_ctl |= FBC_CTL_EN | FBC_CTL_PERIODIC ;
138
137
if (IS_I945GM (dev_priv ))
139
138
fbc_ctl |= FBC_CTL_C3_IDLE ; /* 945 needs special SR handling */
@@ -699,6 +698,9 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc,
699
698
cache -> fb .stride = fb -> pitches [0 ];
700
699
cache -> fb .modifier = fb -> modifier ;
701
700
701
+ /* This value was pulled out of someone's hat */
702
+ cache -> interval = 500 ;
703
+
702
704
cache -> fence_y_offset = intel_plane_fence_y_offset (plane_state );
703
705
704
706
drm_WARN_ON (& dev_priv -> drm , plane_state -> flags & PLANE_HAS_FENCE &&
@@ -873,6 +875,8 @@ static void intel_fbc_get_reg_params(struct intel_crtc *crtc,
873
875
params -> fence_id = cache -> fence_id ;
874
876
params -> fence_y_offset = cache -> fence_y_offset ;
875
877
878
+ params -> interval = cache -> interval ;
879
+
876
880
params -> crtc .pipe = crtc -> pipe ;
877
881
params -> crtc .i9xx_plane = to_intel_plane (crtc -> base .primary )-> i9xx_plane ;
878
882
@@ -1420,11 +1424,6 @@ void intel_fbc_init(struct drm_i915_private *dev_priv)
1420
1424
return ;
1421
1425
}
1422
1426
1423
- /* This value was pulled out of someone's hat */
1424
- if (INTEL_GEN (dev_priv ) <= 4 && !IS_GM45 (dev_priv ))
1425
- intel_de_write (dev_priv , FBC_CONTROL ,
1426
- FBC_CTL_INTERVAL (500 ));
1427
-
1428
1427
/* We still don't have any sort of hardware state readout for FBC, so
1429
1428
* deactivate it in case the BIOS activated it to make sure software
1430
1429
* matches the hardware state. */
0 commit comments