From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Sun, 28 Jun 2020 21:12:14 +0200 Subject: [PATCH] video: rk_vop: Fix wrong bpix for frame buffer In-Reply-To: <20200624151843.120134-1-jagan@amarulasolutions.com> References: <20200624151843.120134-1-jagan@amarulasolutions.com> Message-ID: <20200628211214.263337c1@crub> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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