[Intel-gfx] [PATCH 2/8] drm/i915: Gen2 FBC1 CFB pitch wants 32B units

Imre Deak imre.deak at intel.com
Thu Dec 12 13:54:47 CET 2013


On Thu, 2013-11-28 at 17:29 +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> 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 at linux.intel.com>

Reviewed-by: Imre Deak <imre.deak at intel.com>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 614549b..1dee34c 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -103,8 +103,11 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc,
>  	if (fb->pitches[0] < cfb_pitch)
>  		cfb_pitch = fb->pitches[0];
>  
> -	/* FBC_CTL wants 64B units */
> -	cfb_pitch = (cfb_pitch / 64) - 1;
> +	/* FBC_CTL wants 32B or 64B units */
> +	if (IS_GEN2(dev))
> +		cfb_pitch = (cfb_pitch / 32) - 1;
> +	else
> +		cfb_pitch = (cfb_pitch / 64) - 1;
>  	plane = intel_crtc->plane == 0 ? FBC_CTL_PLANEA : FBC_CTL_PLANEB;
>  
>  	/* Clear old tags */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20131212/efc10a38/attachment.sig>


More information about the Intel-gfx mailing list