]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: simplefb: Add 30bpp support
authorMark Kettenis <kettenis@openbsd.org>
Sat, 25 Sep 2021 20:47:38 +0000 (22:47 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sat, 9 Oct 2021 16:48:25 +0000 (18:48 +0200)
Recognize the canonical format strings for framebuffers in
30bpp mode and 32/24bpp mode.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
drivers/video/simplefb.c

index fd58426cf5d3c09cf3f9dffc094e1f75149d1881..2b0d8835e383376dfb9b92abd291f5f676c300c4 100644 (file)
@@ -50,8 +50,18 @@ static int simple_video_probe(struct udevice *dev)
 
        if (strcmp(format, "r5g6b5") == 0) {
                uc_priv->bpix = VIDEO_BPP16;
-       } else if (strcmp(format, "a8b8g8r8") == 0) {
+       } else if (strcmp(format, "a8b8g8r8") == 0 ||
+                  strcmp(format, "x8b8g8r8") == 0) {
                uc_priv->bpix = VIDEO_BPP32;
+               uc_priv->format = VIDEO_X8B8G8R8;
+       } else if (strcmp(format, "a8r8g8b8") == 0 ||
+                  strcmp(format, "x8r8g8b8") == 0) {
+               uc_priv->bpix = VIDEO_BPP32;
+               uc_priv->format = VIDEO_X8R8G8B8;
+       } else if (strcmp(format, "a2r10g10b10") == 0 ||
+                  strcmp(format, "x2r10g10b10") == 0) {
+               uc_priv->bpix = VIDEO_BPP32;
+               uc_priv->format = VIDEO_X2R10G10B10;
        } else {
                printf("%s: invalid format: %s\n", __func__, format);
                return -EINVAL;