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 C4561C433F5 for ; Sat, 25 Sep 2021 13:41:41 +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 3253D60555 for ; Sat, 25 Sep 2021 13:41:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3253D60555 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.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 E248C8353F; Sat, 25 Sep 2021 15:41:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="mdgn068h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 75110832C4; Sat, 25 Sep 2021 15:41:19 +0200 (CEST) Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7DD37834D0 for ; Sat, 25 Sep 2021 15:41:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vs1-xe29.google.com with SMTP id x74so13018320vsx.13 for ; Sat, 25 Sep 2021 06:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8lBXlDaFup9+820HvVAkkEN6zKMTfId3dYe1tKBoKpA=; b=mdgn068hFaANi3xy4kCjHI2qujPzy6ilLYbvMr19ndqzq2KMm21AB7OkvAZn094GTG Hp50ZpHo+B9a4/nMe78FOkGySLG4e/aUg2eKDI6mAUiYw4K67y7a9oEYOtp8Xb0m6wEG NltSXS+f08lUE3c0pYXh9j6Ha9ewlDN1ZAfbw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8lBXlDaFup9+820HvVAkkEN6zKMTfId3dYe1tKBoKpA=; b=PK62F8u0NQnN+6JHkgiVQXOjzlwEFKpMRSEBUOLaP4t7JYPbrKqnVbZ22i4a5aiBlD qbQqw9+bXm/fqc6QZ0WQ/ybfg3L9/xpee3ekw2sMqy4xwN38ZEa2swtouxlvjbRxuUhv LhtrqjjO3ZkF3rJjjnVxVXeP4aIPQR2gXY+nA91E0p3ufoWr7sLlEhbGOt80h6QVdy5H AOXVLcTJzn3zFBoySnCjMYijwRlgXgbtDXhOxrm6QsoZU9cTNGoAtBZezjzGeZ3FJkoo EMpbJvNFYGU5fJg9GEynAsBE0G1aDmrNWO7eZ9qAKRN955XQ9Xtc590nXNkiFwz59tns 9Xfw== X-Gm-Message-State: AOAM532+Vnqt6X1s8KQDbv+gyhvUkPw2vrg557k2zNVFeUZo1xo/3liq 2R9+uyfGKmqdU4EYt0ZRx9SYBsoVFH5z8UELfR+DTA== X-Google-Smtp-Source: ABdhPJxEO8UH//kI0CjE7qyCnyx4VIAE8HcFryY3BEfQbH7yO0NdxFJ+Pbb8yFtRYdozpLavZECBftg4qw3sH67WR5Q= X-Received: by 2002:a67:67c1:: with SMTP id b184mr14032444vsc.59.1632577268578; Sat, 25 Sep 2021 06:41:08 -0700 (PDT) MIME-Version: 1.0 References: <20210916130117.20894-1-kettenis@openbsd.org> <20210916130117.20894-3-kettenis@openbsd.org> In-Reply-To: <20210916130117.20894-3-kettenis@openbsd.org> From: Simon Glass Date: Sat, 25 Sep 2021 07:40:57 -0600 Message-ID: Subject: Re: [PATCH 2/3] efi_loader: GOP: Add 30bpp support To: Mark Kettenis Cc: U-Boot Mailing List , Anatolij Gustschin , Heinrich Schuchardt , Alexander Graf Content-Type: text/plain; charset="UTF-8" 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 Hi Mark, On Thu, 16 Sept 2021 at 07:02, Mark Kettenis wrote: > > 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 Can avoid #ifdefs please? Does this work? if (IS_ENABLED(CONFIG_DM_VIDEO) && IS_ENABLED(CONFIG_VIDEO_BPP30) && bpix == VIDEO_BPP30) Heinrich might know if we can just require 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 > Tested on: Macbook Air M1 Tested-by: Simon Glass Regards, Simon