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: <bb5d045c-c9de-b6df-cf45-32b1a866264a@suse.de>
Date:   Fri, 27 Aug 2021 19:50:23 +0200
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Javier Martinez Canillas <javierm@...hat.com>,
        linux-kernel@...r.kernel.org
Cc:     "H . Peter Anvin" <hpa@...or.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        x86@...nel.org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-fbdev@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Maxime Ripard <mripard@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Peter Robinson <pbrobinson@...il.com>,
        Hans de Goede <hdegoede@...hat.com>,
        dri-devel@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
        Ingo Molnar <mingo@...hat.com>, David Airlie <airlied@...ux.ie>
Subject: Re: [RFC PATCH 0/4] Allow to use DRM fbdev emulation layer with
 CONFIG_FB disabled

Hi

Am 27.08.21 um 12:00 schrieb Javier Martinez Canillas:
> This patch series splits the fbdev core support in two different Kconfig
> symbols: FB and FB_CORE. The motivation for this is to allow CONFIG_FB to
> be disabled, while still using fbcon with the DRM fbdev emulation layer.

I'm skeptical. DRM's fbdev emulation is not just the console emulation, 
it's a full fbdev device. You can see the related device file as 
/dev/fb*. Providing the file while having CONFIG_FB disabled doesn't 
make much sense to me. I know it's not pretty, but it's consistent at least.

If you want to remove fbdev, you could try to untangle fbdev and the 
console emulation such that DRM can set up a console by itself. Old 
fbdev drives would also set up the console individually.

Another low-hangling fruit is a config option to enable/disable the 
fbdev userspace interface (i.e., dev/fb*). Disabling the interface would 
remove the rsp mmap of the fbdev graphics buffer. We sometimes have to 
use an extra shadow buffer because mmap requires non-moving buffers. 
Without mmap we might be able to avoid some of the costly internal 
memcpys for some of our drivers.

Best regards
Thomas

> 
> The reason for doing this is that now with simpledrm we could just boot
> with simpledrm -> real DRM driver, without needing any legacy fbdev driver
> (e.g: efifb or simplefb) even for the early console.
> 
> We want to do that in the Fedora kernel, but currently need to keep option
> CONFIG_FB enabled and all fbdev drivers explicitly disabled, which makes
> the configuration harder to maintain.
> 
> It is a RFC because I'm not that familiar with the fbdev core, but I have
> tested and works with CONFIG_DRM_FBDEV_EMULATION=y and CONFIG_FB disabled.
> This config automatically disables all the fbdev drivers that is our goal.
> 
> Patch 1/4 is just a clean up, patch 2/4 moves a couple of functions out of
> fbsysfs.o, that are not related to sysfs attributes creation and finally
> patch 3/4 makes the fbdev split that is mentioned above.
> 
> Patch 4/4 makes the DRM fbdev emulation depend on the new FB_CORE symbol
> instead of FB. This could be done as a follow-up but for completeness is
> also included in this series.
> 
> Best regards,
> Javier
> 
> 
> Javier Martinez Canillas (4):
>    fbdev: Rename fb_*_device() functions names to match what they do
>    fbdev: Move framebuffer_{alloc,release}() functions to fbmem.c
>    fbdev: Split frame buffer support in FB and FB_CORE symbols
>    drm: Make fbdev emulation depend on FB_CORE instead of FB
> 
>   arch/x86/Makefile                  |  2 +-
>   arch/x86/video/Makefile            |  2 +-
>   drivers/gpu/drm/Kconfig            |  2 +-
>   drivers/video/console/Kconfig      |  2 +-
>   drivers/video/fbdev/Kconfig        | 57 +++++++++++++---------
>   drivers/video/fbdev/core/Makefile  | 13 +++--
>   drivers/video/fbdev/core/fbmem.c   | 73 ++++++++++++++++++++++++++--
>   drivers/video/fbdev/core/fbsysfs.c | 77 +-----------------------------
>   include/linux/fb.h                 | 18 ++++++-
>   9 files changed, 134 insertions(+), 112 deletions(-)
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer



Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ