[PATCH 3/3] video: simplefb: Add 30bpp support

Mark Kettenis kettenis at openbsd.org
Thu Sep 16 15:01:17 CEST 2021


Recognize the canonical format strings for framebuffers in
30bpp mode.

Signed-off-by: Mark Kettenis <kettenis at openbsd.org>
---
 drivers/video/simplefb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index fd58426cf5..7e1cc4560f 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -52,6 +52,9 @@ static int simple_video_probe(struct udevice *dev)
 		uc_priv->bpix = VIDEO_BPP16;
 	} else if (strcmp(format, "a8b8g8r8") == 0) {
 		uc_priv->bpix = VIDEO_BPP32;
+	} else if (strcmp(format, "a2r10g10b10") == 0 ||
+		   strcmp(format, "x2r10g10b10") == 0) {
+		uc_priv->bpix = VIDEO_BPP30;
 	} else {
 		printf("%s: invalid format: %s\n", __func__, format);
 		return -EINVAL;
-- 
2.33.0



More information about the U-Boot mailing list