lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0bae0df1-48ae-d02f-bce4-d1f69acf269e@redhat.com>
Date:   Fri, 20 May 2022 11:41:33 +0200
From:   Javier Martinez Canillas <javierm@...hat.com>
To:     Ard Biesheuvel <ardb@...nel.org>,
        Huacai Chen <chenhuacai@...ngson.cn>
Cc:     Arnd Bergmann <arnd@...db.de>, Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Airlie <airlied@...ux.ie>,
        Jonathan Corbet <corbet@....net>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Linux Doc Mailing List <linux-doc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Yanteng Si <siyanteng@...ngson.cn>,
        Huacai Chen <chenhuacai@...il.com>,
        Guo Ren <guoren@...nel.org>, Xuerui Wang <kernel@...0n.name>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        linux-efi <linux-efi@...r.kernel.org>
Subject: Re: [PATCH V11 09/22] LoongArch: Add boot and setup routines

Hello Ard and Huacai,

On 5/20/22 11:17, Ard Biesheuvel wrote:

[snip]

>> +
>> +static int __init register_gop_device(void)
>> +{
>> +       void *pd;
>> +
>> +       if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
>> +               return 0;
>> +       pd = platform_device_register_data(NULL, "efi-framebuffer", 0,
>> +                       &screen_info, sizeof(screen_info));
>> +       return PTR_ERR_OR_ZERO(pd);
>> +}
>> +subsys_initcall(register_gop_device);
> 
> Not sure this is now the correct way to do this - cc'ing Javier.
> 

Is not the correct way to do it indeed, that can just be dropped.

We have unified now all the system framebuffer platform device
registration under drivers/firmware/sysfb.c (and the EFI quirks
if needed under drivers/firmware/efi/sysfb_efi.c).

So the only thing that a platform should do, is to enable the
the CONFIG_SYSFB config option. The screen_info should be set
correctly from the EFI GOP, but it seems that's already working
since you were already using it in register_gop_device().

But also, the "efi-framebuffer" platform device matches against
the legacy efifb fbdev driver. And now there's a simpledrm driver
that is also able to use the firmware-provided framebuffer.

You can enable that driver with CONFIG_DRM_SIMPLEDRM.

That driver though doesn't match against "efi-framebuffer" but with
a "simple-framebuffer", to make sysfb register that instead of the
"efi-framebuffer" device, you need to set CONFIG_SYSFB_SIMPLEFB too.

If for some reasons you need to provide a fbdev interface to the
user-space, you can enable CONFIG_DRM_FBDEV_EMULATION to have that.

In summary, just enable the following to use the firmware framebuffer:

CONFIG_DRM_SIMPLEDRM=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_SYSFB=y
CONFIG_SYSFB_SIMPLEFB=y

-- 
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ