public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [PATCH] video: rk_vop: Fix wrong bpix for frame buffer
Date: Wed, 24 Jun 2020 20:48:43 +0530	[thread overview]
Message-ID: <20200624151843.120134-1-jagan@amarulasolutions.com> (raw)

Video framework would use plat size as a frame buffer
pointer in rockchip video drivers.

Typical frame buffer pointer would compute based on
maximum resolutions supporting followed by bits per
pixel value. Right now the value 4 (VIDEO_BPP16) is
using on this computation even though the HDMI vop_id
assigned as VIDEO_BPP32.

This results below synchronous abort while clearing the
frame buffer to the background color.

"Synchronous Abort" handler, esr 0x96000045
elr: 0000000000236ff0 lr : 0000000000236f74 (reloc)
elr: 00000000f6f6eff0 lr : 00000000f6f6ef74
x0 : 00000000f8000000 x1 : 0000000000000000
x2 : 00000000f97a4000 x3 : 00000000ff1a0000
x4 : 00000000ff1a0000 x5 : 0000000000000035
x6 : 000000000000000a x7 : 00000000f4f1fe50
x8 : 0000000000000000 x9 : 0000000000000008
x10: 00000000ffffffd8 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000005dc0
x14: 0000000000000000 x15: 00000000ffffffff
x16: 0000000000000001 x17: 0000000000000032
x18: 00000000f4f31dc0 x19: 00000000f4f47160
x20: 00000000f6fb5814 x21: 00000000f4f1feb0
x22: 00000000f6fea748 x23: 00000000f6fea748
x24: 00000000f4f47108 x25: 00000000f4f47110
x26: 00000000f4f46ed0 x27: 00000000f4f47118
x28: 0000000000000002 x29: 00000000f4f1fe50

Reproduced on,
Board: roc-rk3399-pc
Video Out: HDMI with 3480x2160 resolution.

Fix this by using maximum bpix value which is VIDEO_BPP32
to satisfy all? vop_id connections.

Reported-by: Da Xue <da@lessconfused.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/video/rockchip/rk_vop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
index ff1a80384d..3bae22a5bc 100644
--- a/drivers/video/rockchip/rk_vop.c
+++ b/drivers/video/rockchip/rk_vop.c
@@ -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);
 
 	return 0;
-- 
2.25.1

             reply	other threads:[~2020-06-24 15:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 15:18 Jagan Teki [this message]
2020-06-28 15:06 ` [PATCH] video: rk_vop: Fix wrong bpix for frame buffer Jagan Teki
2020-06-28 19:19   ` Anatolij Gustschin
2020-06-28 19:12 ` Anatolij Gustschin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200624151843.120134-1-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox