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=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 9F1E2C48BE6 for ; Wed, 16 Jun 2021 14:25:51 +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 B59E261159 for ; Wed, 16 Jun 2021 14:25:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B59E261159 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de 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 5973982985; Wed, 16 Jun 2021 16:25:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="azRtCp8K"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6416C829F2; Wed, 16 Jun 2021 16:25:46 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (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 744E382958 for ; Wed, 16 Jun 2021 16:25:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1623853540; bh=oSehHIJOZKTaxkG5WCKuYj3fMbQVtIJEnB/iDV6J2a0=; h=X-UI-Sender-Class:Date:In-Reply-To:References:Subject:To:CC:From; b=azRtCp8K5qdVpNNzNhjRHzZBNqTk60ny3dA7ONxaBrTIVZq66ntFwHiNzfk86h8sz BhxOTbhk7oCvk4i4/KSk+HPMkE37sv6ox0lSc4DLT30n2cOXo6dxxrTz3Od5cHGRyD rlg/KncX4kf6/t7mtmHJB98h/FshV9VPZd9j5Ud0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.137.129.32] ([46.114.105.32]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MV63g-1llNmn3ouc-00S5i0; Wed, 16 Jun 2021 16:25:40 +0200 Date: Wed, 16 Jun 2021 16:25:35 +0200 User-Agent: K-9 Mail for Android In-Reply-To: References: <20210615211028.287546-1-icenowy@aosc.io> <65D3D4A3-8E27-4CCE-BDE9-01D5FE7F32EC@gmx.de> <0402a529e381bd8dff81db7afd6bf7b5e4dfc95d.camel@aosc.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] efi_loader: allow to disable GOP support To: Peter Robinson ,Icenowy Zheng CC: Alexander Graf ,u-boot@lists.denx.de From: Heinrich Schuchardt Message-ID: X-Provags-ID: V03:K1:sJABXyvjAWVVj86GuZ1u601SqjvBtDP11Mrzo9Sk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vhoIvpuigSILBkDl514aVrXTGgrCEoA0KSWAqcSv ak3fjtWZSUWKlrhEdpXO8Oq0uisFmknQ8dzeZVEUuFJUZq6j1ivaKStnTQuHuF5uV7zq95NFd Td1S/jOf0QDiSmJ5KFSyZfT5uR0Jrc8HTgKZDFC3D9jwoaHUw6LmwEX1xsPqfsj4YLmd5Eb/o x/a9GQvQzr/dF5r+Nb+NjKX4XzBn8vxYkPU88HuyNBUDFbM2fp1oTvsR2qQyBQkfvmU9z6ST8 /e7s4qe2cT3TzgTs6wuUYmrf9nMe645LdJ2 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 Am 16=2E Juni 2021 16:18:35 MESZ schrieb Peter Robinson : >On Wed, Jun 16, 2021 at 3:11 PM Icenowy Zheng wrote: >> >> =E5=9C=A8 2021-06-16=E6=98=9F=E6=9C=9F=E4=B8=89=E7=9A=84 15:06 +0100=EF= =BC=8CPeter Robinson=E5=86=99=E9=81=93=EF=BC=9A >> > On Wed, Jun 16, 2021 at 1:20 PM Icenowy Zheng >> > wrote: >> > > >> > > =E5=9C=A8 2021-06-16=E6=98=9F=E6=9C=9F=E4=B8=89=E7=9A=84 06:59 +020= 0=EF=BC=8CHeinrich Schuchardt=E5=86=99=E9=81=93=EF=BC=9A >> > > > Am 15=2E Juni 2021 23:10:28 MESZ schrieb Icenowy Zheng >> > > > : >> > > > > Sometimes EFI GOP support may be not wanted (e=2Eg=2E because t= he >> > > > > operating >> > > > > system cannot operate well with it) even if video support in >U- >> > > > > Boot >> > > > > is >> > > > > needed=2E >> > > > >> > > > Which OS has which problem? >> > > > Why don't you fix the OS? >> > > >> > > I'm trying RK3399 with Linux=2E 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=2E >> > >> > It's due to bugs in Linux, it will be fixed in 5=2E14 with these >> > patches >> > from our Fedora testing: >> > >https://lists=2Efreedesktop=2Eorg/archives/dri-devel/2021-May/306803=2Eht= ml >> >> I think this patch should get backported=2E > >I have no problems with that so feel free to propose it to the stable >kernels=2E > >> BTW a point of using EFI boot is to support existing distros, which >> won't have this patch=2E > >Sure, but UEFI doesn't guarantee there aren't bugs in kernels or >firmware though, it certainly makes things more straight forward but >it's no silver bullet=2E > https://passthroughpo=2Est/explaining-csm-efifboff-setting-boot-gpu-manual= ly/ refers to a Linux command line parameter that could be used: video=3Defifb:off Best regards Heinrich >> > >> > There's also this enhancement, also should land in 5=2E14, which is >> > dependent on the feature that's in the second link: >> > >> > >https://lists=2Efreedesktop=2Eorg/archives/dri-devel/2021-May/306803=2Eht= ml >> > >https://lists=2Efreedesktop=2Eorg/archives/dri-devel/2021-April/303291=2E= html >> > >> > With that first patch it mostly works for me, the second two series >> > improves on that some more=2E >> > >> > Peter >> > >> > > The second problem has a proposed fix, but the first problem is >> > > mystery=2E >> > > >> > > > >> > > > Best regards >> > > > >> > > > Heinrich >> > > > >> > > > >> > > > > >> > > > > Allow to disable EFI GOP support with a Kconfig option=2E >> > > > > >> > > > > Signed-off-by: Icenowy Zheng >> > > > > --- >> > > > > lib/efi_loader/Kconfig | 8 ++++++++ >> > > > > lib/efi_loader/Makefile | 3 +-- >> > > > > lib/efi_loader/efi_setup=2Ec | 11 ++++++----- >> > > > > 3 files changed, 15 insertions(+), 7 deletions(-) >> > > > > >> > > > > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig >> > > > > index 6242caceb7=2E=2E5ba0ce6a44 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=2E >> > > > > + >> > > > > 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=2E=2E826563d9a7 100644 >> > > > > --- a/lib/efi_loader/Makefile >> > > > > +++ b/lib/efi_loader/Makefile >> > > > > @@ -54,8 +54,7 @@ obj-$(CONFIG_EFI_VARIABLES_PRESEED) +=3D >> > > > > efi_var_seed=2Eo >> > > > > endif >> > > > > obj-y +=3D efi_watchdog=2Eo >> > > > > obj-$(CONFIG_EFI_ESRT) +=3D efi_esrt=2Eo >> > > > > -obj-$(CONFIG_LCD) +=3D efi_gop=2Eo >> > > > > -obj-$(CONFIG_DM_VIDEO) +=3D efi_gop=2Eo >> > > > > +obj-$(CONFIG_EFI_GOP_PROTOCOL) +=3D efi_gop=2Eo >> > > > > obj-$(CONFIG_PARTITIONS) +=3D efi_disk=2Eo >> > > > > obj-$(CONFIG_NET) +=3D efi_net=2Eo >> > > > > obj-$(CONFIG_GENERATE_ACPI_TABLE) +=3D efi_acpi=2Eo >> > > > > diff --git a/lib/efi_loader/efi_setup=2Ec >> > > > > b/lib/efi_loader/efi_setup=2Ec >> > > > > index 3c5cf9a435=2E=2E98deb63777 100644 >> > > > > --- a/lib/efi_loader/efi_setup=2Ec >> > > > > +++ b/lib/efi_loader/efi_setup=2Ec >> > > > > @@ -254,11 +254,12 @@ efi_status_t efi_init_obj_list(void) >> > > > > if (ret !=3D EFI_SUCCESS) >> > > > > goto out; >> > > > > >> > > > > -#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO) >> > > > > - ret =3D efi_gop_register(); >> > > > > - if (ret !=3D EFI_SUCCESS) >> > > > > - goto out; >> > > > > -#endif >> > > > > + if (IS_ENABLED(CONFIG_EFI_GOP_PROTOCOL)) { >> > > > > + ret =3D efi_gop_register(); >> > > > > + if (ret !=3D EFI_SUCCESS) >> > > > > + goto out; >> > > > > + } >> > > > > + >> > > > > #ifdef CONFIG_NET >> > > > > ret =3D efi_net_register(); >> > > > > if (ret !=3D EFI_SUCCESS) >> > > >>