From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F8A0C433EF for ; Sat, 25 Sep 2021 20:49:14 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95A6D61029 for ; Sat, 25 Sep 2021 20:49:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 95A6D61029 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C0816835B5; Sat, 25 Sep 2021 22:48:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id CD19D8358F; Sat, 25 Sep 2021 22:48:18 +0200 (CEST) Received: from lb1-smtp-cloud8.xs4all.net (lb1-smtp-cloud8.xs4all.net [194.109.24.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6B6A9835A2 for ; Sat, 25 Sep 2021 22:48:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=kettenis@openbsd.org Received: from cust-df1d398c ([IPv6:fc0c:c1f5:9ac0:c45f:1583:5c5b:91fa:2436]) by smtp-cloud8.xs4all.net with ESMTPA id UEaPm9fRLdDnlUEaam8I21; Sat, 25 Sep 2021 22:48:04 +0200 From: Mark Kettenis To: u-boot@lists.denx.de Cc: Mark Kettenis , Anatolij Gustschin , Heinrich Schuchardt , Alexander Graf Subject: [PATCH v2 3/4] video: simplefb: Add 30bpp support Date: Sat, 25 Sep 2021 22:47:38 +0200 Message-Id: <20210925204740.52468-4-kettenis@openbsd.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210925204740.52468-1-kettenis@openbsd.org> References: <20210925204740.52468-1-kettenis@openbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfNg3vr797boHf4MAFgJkga/Hx9pcb/RSr+LhPkOd1QjqWGWTXxXgS1iV3XIycSPOD0H61nEtecngx5V46HJPr6jjhJVqGOl2Sdki8DeGL+1QzXgfDrm4 EQZV3tvcbcKfpjaw9I0k0mlVizKOPJsI+UIor7e72yBPVPIf9IdZVpzaatJcKIgAJR+vINw5OS3yH7CP9KZ9Ban8smjO2bzTG0AXuLEsF5RB8hvl4F9lLzpw mXi7xAp9wspYygmLe1aWzvV+xZGRsE60HlgYC4WpAmYLTltlYEL2xTA2jsPe3BbgKfZqUNhy7qnak0PF2EJtww== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Recognize the canonical format strings for framebuffers in 30bpp mode and 32/24bpp mode. Signed-off-by: Mark Kettenis --- 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