diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-11-28 10:29:56 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-12 09:57:47 -0500 |
commit | 42a430f51c7500be41ca4cbd5b3de930853bd5ee (patch) | |
tree | 877d9387460e7524decc30a391ca6d88bd187767 | |
parent | 566b734a190766f25f21c8c44633c14a122e61fa (diff) |
drm/i915: Gen2 FBC1 CFB pitch wants 32B units
On gen2 the compressed frame buffer pitch is specified in 32B units
rather than the 64B units used on gen3+.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 3cd521f3823b..599d445f7ce9 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -104,8 +104,11 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval) | |||
104 | if (fb->pitches[0] < cfb_pitch) | 104 | if (fb->pitches[0] < cfb_pitch) |
105 | cfb_pitch = fb->pitches[0]; | 105 | cfb_pitch = fb->pitches[0]; |
106 | 106 | ||
107 | /* FBC_CTL wants 64B units */ | 107 | /* FBC_CTL wants 32B or 64B units */ |
108 | cfb_pitch = (cfb_pitch / 64) - 1; | 108 | if (IS_GEN2(dev)) |
109 | cfb_pitch = (cfb_pitch / 32) - 1; | ||
110 | else | ||
111 | cfb_pitch = (cfb_pitch / 64) - 1; | ||
109 | plane = intel_crtc->plane == 0 ? FBC_CTL_PLANEA : FBC_CTL_PLANEB; | 112 | plane = intel_crtc->plane == 0 ? FBC_CTL_PLANEA : FBC_CTL_PLANEB; |
110 | 113 | ||
111 | /* Clear old tags */ | 114 | /* Clear old tags */ |