Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30657C433F5 for ; Thu, 16 Sep 2021 13:02:06 +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 3482F61165 for ; Thu, 16 Sep 2021 13:02:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3482F61165 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 A884E83131; Thu, 16 Sep 2021 15:01: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 9394A82FC0; Thu, 16 Sep 2021 15:01:48 +0200 (CEST) Received: from lb3-smtp-cloud8.xs4all.net (lb3-smtp-cloud8.xs4all.net [194.109.24.29]) (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 293058312A for ; Thu, 16 Sep 2021 15:01:41 +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 Qr14ma2YReJ0cQr1JmsVtM; Thu, 16 Sep 2021 15:01:41 +0200 From: Mark Kettenis To: u-boot@lists.denx.de Cc: Mark Kettenis , Anatolij Gustschin , Heinrich Schuchardt , Alexander Graf Subject: [PATCH 2/3] efi_loader: GOP: Add 30bpp support Date: Thu, 16 Sep 2021 15:01:16 +0200 Message-Id: <20210916130117.20894-3-kettenis@openbsd.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916130117.20894-1-kettenis@openbsd.org> References: <20210916130117.20894-1-kettenis@openbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfDK04EMSIpOPA9qFRtKUe3NwmI6svp1XB8cnvHlTcgLwKHGWxJOaOKD6scHhVge/aZooigaW8skb8zSmpD1qe11RmV8T3gsSdbsmAJY17LFbspQwCZCK GCkwSnXE1GJ3c4rvZ7nw9XX20R53VUhgxXjSfRQxppKOWj8/1FI7+gpgJd8NUqOzYVOrN1QqGeDI0kSniG6O2OuMFYJ9NtVI47VwTmFVTDHKtGtUANF0hKME 15IqyIGxGGm5EFdndQvAUYccRwoKF52Zh9G3DEWolKFKUJ7VSpIB1Bn6Ks1qForDCq3xHDCkygtAXNtwhTJ86g== 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 Provide correct framebuffer information for 30bpp modes. Signed-off-by: Mark Kettenis --- lib/efi_loader/efi_gop.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index 1206b2d7a2..42bf49b184 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -227,6 +227,7 @@ static efi_uintn_t gop_get_bpp(struct efi_gop *this) switch (gopobj->bpix) { #ifdef CONFIG_DM_VIDEO + case VIDEO_BPP30: case VIDEO_BPP32: #else case LCD_COLOR32: @@ -468,6 +469,7 @@ efi_status_t efi_gop_register(void) switch (bpix) { #ifdef CONFIG_DM_VIDEO case VIDEO_BPP16: + case VIDEO_BPP30: case VIDEO_BPP32: #else case LCD_COLOR32: @@ -518,6 +520,14 @@ efi_status_t efi_gop_register(void) #endif { gopobj->info.pixel_format = EFI_GOT_BGRA8; +#ifdef CONFIG_DM_VIDEO + } else if (bpix == VIDEO_BPP30) { + gopobj->info.pixel_format = EFI_GOT_BITMASK; + gopobj->info.pixel_bitmask[0] = 0x3ff00000; /* red */ + gopobj->info.pixel_bitmask[1] = 0x000ffc00; /* green */ + gopobj->info.pixel_bitmask[2] = 0x000003ff; /* blue */ + gopobj->info.pixel_bitmask[3] = 0xc0000000; /* reserved */ +#endif } else { gopobj->info.pixel_format = EFI_GOT_BITMASK; gopobj->info.pixel_bitmask[0] = 0xf800; /* red */ -- 2.33.0