[PATCH 3/7] drm/cirrus: Decouple fbdev bpp value from color depth

Javier Martinez Canillas javierm at redhat.com
Fri Nov 18 13:44:45 UTC 2022


On 11/16/22 17:09, Thomas Zimmermann wrote:
> Cirrus has a preferred color depth of 16 bit; also use it as fbdev
> bpp value. Don't use the color depth directly. It has a different
> meaning than bpp and both cannot be used interchangeably.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---
>  drivers/gpu/drm/tiny/cirrus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c
> index 678c2ef1cae70..cf35b60905032 100644
> --- a/drivers/gpu/drm/tiny/cirrus.c
> +++ b/drivers/gpu/drm/tiny/cirrus.c
> @@ -604,7 +604,7 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
>  	if (ret)
>  		return ret;
>  
> -	drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth);
> +	drm_fbdev_generic_setup(dev, 16);

Even though this is not strictly needed as you mentioned, I agree that
it's better to decouple it from the color depth and make it explicit.

Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



More information about the dri-devel mailing list