diff options
author | Mark Kettenis <kettenis@openbsd.org> | 2021-09-25 23:47:38 +0300 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2021-10-09 19:48:25 +0300 |
commit | 2c2653d6f98eef645420f170869181710955a166 (patch) | |
tree | a80bcd9fc2a8d9e88a9f4c62f89c11f2d781c9fe /drivers/video | |
parent | 01fcf0eea634c727980a8b7d2d08c61fe7f142d9 (diff) | |
download | u-boot-2c2653d6f98eef645420f170869181710955a166.tar.xz |
video: simplefb: Add 30bpp support
Recognize the canonical format strings for framebuffers in
30bpp mode and 32/24bpp mode.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/simplefb.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c index fd58426cf5..2b0d8835e3 100644 --- a/drivers/video/simplefb.c +++ b/drivers/video/simplefb.c @@ -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; |