drm/sysfb: Add efidrm for EFI displays
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 1 Apr 2025 09:37:17 +0000 (11:37 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 7 Apr 2025 09:02:07 +0000 (11:02 +0200)
commit32ae90c66fb62e4f6ae859422f733dfb249f10cf
treef5946a419e95ffdc28b808f11067a989d5b9246d
parent1ce4c3aeef333be1e6290ec6d1f7891c2bfc7a1f
drm/sysfb: Add efidrm for EFI displays

Add support for screen_info setups with VIDEO_TYPE_EFI. Provide the
minimum functionality of reading modes, updating and clearing the display.

There is existing support for these displays provided by simpledrm with
CONFIG_SYSFB_SIMPLEFB=y. Using efidrm over simpledrm will allows for the
mapping of video memory with correct caching. Simpledrm always assumes WC
caching, while fully cached memory is possible with efidrm. Efidrm will
also allow for the use of additional functionality provided by EFI, such
as EDID information.

In addition to efidrm, add struct pixel_format plus initializer macros.
The type and macros describe pixel formats in a generic way on order to
find the DRM format from the screen_info settings. Similar existing code
in SIMPLEFB_FORMATS and fbdev is not really what is needed in efidrm,
but SIMPLEFB_FORMATS can later be converted to struct pixel_format.

v4:
- depend on CONFIG_EFI
- disallow module for now as efi_mem_desc_lookup() is not exported
v3:
- depend on !SYSFB_SIMPLEFB (Javier)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250401094056.32904-15-tzimmermann@suse.de
drivers/gpu/drm/sysfb/Kconfig
drivers/gpu/drm/sysfb/Makefile
drivers/gpu/drm/sysfb/efidrm.c [new file with mode: 0644]
include/video/pixel_format.h [new file with mode: 0644]