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 X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 6AB0DC48BE6 for ; Wed, 16 Jun 2021 14:10:28 +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 2061C61059 for ; Wed, 16 Jun 2021 14:10:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2061C61059 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aosc.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9C5D782971; Wed, 16 Jun 2021 16:10:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aosc.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=mymailcheap.com header.i=@mymailcheap.com header.b="UwybycP5"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=aosc.io header.i=@aosc.io header.b="QdefxVLP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 46D318297B; Wed, 16 Jun 2021 16:10:23 +0200 (CEST) Received: from relay3.mymailcheap.com (relay3.mymailcheap.com [217.182.66.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 43DB682971 for ; Wed, 16 Jun 2021 16:10:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aosc.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=icenowy@aosc.io Received: from filter2.mymailcheap.com (filter2.mymailcheap.com [91.134.140.82]) by relay3.mymailcheap.com (Postfix) with ESMTPS id E187F3F15F; Wed, 16 Jun 2021 16:10:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by filter2.mymailcheap.com (Postfix) with ESMTP id C190D2A91D; Wed, 16 Jun 2021 16:10:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1623852618; bh=PcqMou8KrZSf7cXAVrArZrhNprhavVnKIOVkMgh5eo4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=UwybycP5OGCF+/mqFKiYc/Zr4HgXDHcQF5H261HC9KR2CFheoP774aH2MLJF5U4z6 OQSk8RLSKIoj580ecY9LCKSVMMMK4pYxWhvtwPXt7u3SjzxMw5nGq99QnHDxPiUkO5 d2TvALNfOafq2owDp7Qy6eHnihExzi0y7+tonCeI= Received: from filter2.mymailcheap.com ([127.0.0.1]) by localhost (filter2.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yVvFZMyLXExL; Wed, 16 Jun 2021 16:10:17 +0200 (CEST) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter2.mymailcheap.com (Postfix) with ESMTPS; Wed, 16 Jun 2021 16:10:14 +0200 (CEST) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id 9A98242242; Wed, 16 Jun 2021 14:10:13 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=aosc.io header.i=@aosc.io header.b="QdefxVLP"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from ice-e5v2.lan (unknown [59.41.162.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id B9262412D0; Wed, 16 Jun 2021 14:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default; t=1623852585; bh=PcqMou8KrZSf7cXAVrArZrhNprhavVnKIOVkMgh5eo4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=QdefxVLPAykUaWynvoHmLfcE433KADYw0NS6GcruJXYxsPxBiofRfTlerDudy/6sc TaQ8P092xwjvaAugW4FJPhwKopii4Qx4XPoCEsW5TT0GlWsxzNVxYhtxC+jENFekZN SmzUA2cpj/VLRDpGbSmcU+sXc0hEvlh3Qrw27R9w= Message-ID: <6dabc21df6f388fe83def54114541745b49c88af.camel@aosc.io> Subject: Re: [PATCH] efi_loader: allow to disable GOP support From: Icenowy Zheng To: Heinrich Schuchardt , Alexander Graf Cc: u-boot@lists.denx.de Date: Wed, 16 Jun 2021 22:09:39 +0800 In-Reply-To: <62E13894-F7F3-45CC-A2AF-1763B89E9755@gmx.de> References: <20210615211028.287546-1-icenowy@aosc.io> <65D3D4A3-8E27-4CCE-BDE9-01D5FE7F32EC@gmx.de> <0402a529e381bd8dff81db7afd6bf7b5e4dfc95d.camel@aosc.io> <62E13894-F7F3-45CC-A2AF-1763B89E9755@gmx.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: mail20.mymailcheap.com X-Spamd-Result: default: False [-0.10 / 10.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[aosc.io:s=default]; RECEIVED_SPAMHAUS_PBL(0.00)[59.41.162.158:received]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_ENVRCPT(0.00)[gmx.de]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[aosc.io]; TO_DN_SOME(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[aosc.io:+]; FREEMAIL_TO(0.00)[gmx.de,csgraf.de]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Queue-Id: 9A98242242 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 在 2021-06-16星期三的 15:20 +0200,Heinrich Schuchardt写道: > Am 16. Juni 2021 14:19:41 MESZ schrieb Icenowy Zheng > : > > 在 2021-06-16星期三的 06:59 +0200,Heinrich Schuchardt写道: > > > Am 15. Juni 2021 23:10:28 MESZ schrieb Icenowy Zheng > > > : > > > > Sometimes EFI GOP support may be not wanted (e.g. because the > > > > operating > > > > system cannot operate well with it) even if video support in U- > > > > Boot > > > > is > > > > needed. > > > > > > Which OS has which problem? > > > Why don't you fix the OS? > > > > I'm trying RK3399 with Linux. EFIFB never works as intended (maybe > > it's > > because IOMMU is reconfigured), and rockchipdrmfb will be fb1 > > (leave > > non-working EFIFB as fb0), makes fbcon unusable. > > The GOP driver is not available after ExitBootServices. You can't use > it after the EFI stub hands over to main Linux. I think Linux will remember a FB address before ExitBootServices, and continue to use it then. > > Shouldn't the Panfrost driver and Mesa be used for RK3399? > https://wiki.debian.org/PanfrostLima , > https://www.collabora.com/news-and-blog/blog/2019/08/06/rockpi-panfrost-wayland/ > Well, you made a common error that thinks on embedded systems GPUs are responsible for display. It's not, for display (not 3D rendering) rockchipdrm is the driver. > Best regards > > Heinrich > > > > > > The second problem has a proposed fix, but the first problem is > > mystery. > > > > > > > > Best regards > > > > > > Heinrich > > > > > > > > > > > > > > Allow to disable EFI GOP support with a Kconfig option. > > > > > > > > Signed-off-by: Icenowy Zheng > > > > --- > > > > lib/efi_loader/Kconfig     |  8 ++++++++ > > > > lib/efi_loader/Makefile    |  3 +-- > > > > lib/efi_loader/efi_setup.c | 11 ++++++----- > > > > 3 files changed, 15 insertions(+), 7 deletions(-) > > > > > > > > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig > > > > index 6242caceb7..5ba0ce6a44 100644 > > > > --- a/lib/efi_loader/Kconfig > > > > +++ b/lib/efi_loader/Kconfig > > > > @@ -282,6 +282,14 @@ config EFI_HAVE_RUNTIME_RESET > > > >         depends on ARCH_BCM283X || FSL_LAYERSCAPE || PSCI_RESET > > > > || > > > > \ > > > >                    SANDBOX || SYSRESET_X86 > > > > > > > > +config EFI_GOP_PROTOCOL > > > > +       bool "EFI_GOP_PROTOCOL support" > > > > +       default y > > > > +       depends on DM_VIDEO || LCD > > > > +       help > > > > +         Provide a EFI_GOP_PROTOCOL implementation using the > > > > graphics > > > > +         hardware initialized by U-Boot. > > > > + > > > > config EFI_GRUB_ARM32_WORKAROUND > > > >         bool "Workaround for GRUB on 32bit ARM" > > > >         default n if ARCH_BCM283X || ARCH_SUNXI || ARCH_QEMU > > > > diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile > > > > index fd344cea29..826563d9a7 100644 > > > > --- a/lib/efi_loader/Makefile > > > > +++ b/lib/efi_loader/Makefile > > > > @@ -54,8 +54,7 @@ obj-$(CONFIG_EFI_VARIABLES_PRESEED) += > > > > efi_var_seed.o > > > > endif > > > > obj-y += efi_watchdog.o > > > > obj-$(CONFIG_EFI_ESRT) += efi_esrt.o > > > > -obj-$(CONFIG_LCD) += efi_gop.o > > > > -obj-$(CONFIG_DM_VIDEO) += efi_gop.o > > > > +obj-$(CONFIG_EFI_GOP_PROTOCOL) += efi_gop.o > > > > obj-$(CONFIG_PARTITIONS) += efi_disk.o > > > > obj-$(CONFIG_NET) += efi_net.o > > > > obj-$(CONFIG_GENERATE_ACPI_TABLE) += efi_acpi.o > > > > diff --git a/lib/efi_loader/efi_setup.c > > > > b/lib/efi_loader/efi_setup.c > > > > index 3c5cf9a435..98deb63777 100644 > > > > --- a/lib/efi_loader/efi_setup.c > > > > +++ b/lib/efi_loader/efi_setup.c > > > > @@ -254,11 +254,12 @@ efi_status_t efi_init_obj_list(void) > > > >         if (ret != EFI_SUCCESS) > > > >                 goto out; > > > > > > > > -#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO) > > > > -       ret = efi_gop_register(); > > > > -       if (ret != EFI_SUCCESS) > > > > -               goto out; > > > > -#endif > > > > +       if (IS_ENABLED(CONFIG_EFI_GOP_PROTOCOL)) { > > > > +               ret = efi_gop_register(); > > > > +               if (ret != EFI_SUCCESS) > > > > +                       goto out; > > > > +       } > > > > + > > > > #ifdef CONFIG_NET > > > >         ret = efi_net_register(); > > > >         if (ret != EFI_SUCCESS)