[PATCH] video: rk_vop: Fix wrong bpix for frame buffer

Anatolij Gustschin agust at denx.de
Sun Jun 28 21:12:14 CEST 2020


Hi Jagan,

On Wed, 24 Jun 2020 20:48:43 +0530
Jagan Teki jagan at amarulasolutions.com wrote:
...
> @@ -425,7 +425,7 @@ int rk_vop_bind(struct udevice *dev)
>  {
>  	struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
>  
> -	plat->size = 4 * (CONFIG_VIDEO_ROCKCHIP_MAX_XRES *
> +	plat->size = VIDEO_BPP32 * (CONFIG_VIDEO_ROCKCHIP_MAX_XRES *
>  			  CONFIG_VIDEO_ROCKCHIP_MAX_YRES);

Factor 4 here is actually correct (4 bytes/pixel * xres * yres),
so the problem must be elsewhere. Are you sure that the detected
display resolution matches the values in CONFIG_VIDEO_ROCKCHIP_MAX_*
options in your .config?

Using VIDEO_BPP32 enum here is wrong, VIDEO_BPP32 is log2 value of 32BPP.
We could use VNBYTES(VIDEO_BPP32) for readability, but it won't fix the
problem you see.

--
Anatolij


More information about the U-Boot mailing list