All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@openbsd.org>
To: u-boot@lists.denx.de
Cc: Mark Kettenis <kettenis@openbsd.org>,
	Anatolij Gustschin <agust@denx.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Alexander Graf <agraf@csgraf.de>
Subject: [PATCH v2 3/4] video: simplefb: Add 30bpp support
Date: Sat, 25 Sep 2021 22:47:38 +0200	[thread overview]
Message-ID: <20210925204740.52468-4-kettenis@openbsd.org> (raw)
In-Reply-To: <20210925204740.52468-1-kettenis@openbsd.org>

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 | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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;
-- 
2.33.0


  parent reply	other threads:[~2021-09-25 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25 20:47 [PATCH v2 0/4] 30bpp framebuffer support Mark Kettenis
2021-09-25 20:47 ` [PATCH v2 1/4] video: Add 30bpp support Mark Kettenis
2021-09-25 20:47 ` [PATCH v2 2/4] efi_loader: GOP: " Mark Kettenis
2021-09-25 20:47 ` Mark Kettenis [this message]
2021-09-25 20:47 ` [PATCH v2 4/4] efi_loader: GOP: Fix 30bpp block transfer support Mark Kettenis
2021-09-26  6:51   ` Heinrich Schuchardt
2021-10-12  7:24 ` [PATCH v2 0/4] 30bpp framebuffer support 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=20210925204740.52468-4-kettenis@openbsd.org \
    --to=kettenis@openbsd.org \
    --cc=agraf@csgraf.de \
    --cc=agust@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.