Skip to content

Commit 32ae90c

Browse files
committed
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
1 parent 1ce4c3a commit 32ae90c

File tree

4 files changed

+545
-0
lines changed

4 files changed

+545
-0
lines changed

drivers/gpu/drm/sysfb/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ config DRM_SYSFB_HELPER
77
tristate
88
depends on DRM
99

10+
config DRM_EFIDRM
11+
bool "EFI framebuffer driver"
12+
depends on (DRM=y) && MMU && EFI && (!SYSFB_SIMPLEFB || COMPILE_TEST)
13+
select APERTURE_HELPERS
14+
select DRM_CLIENT_SELECTION
15+
select DRM_GEM_SHMEM_HELPER
16+
select DRM_KMS_HELPER
17+
select DRM_SYSFB_HELPER
18+
select SYSFB
19+
help
20+
DRM driver for EFI framebuffers.
21+
22+
This driver assumes that the display hardware has been initialized
23+
by the firmware or bootloader before the kernel boots. Scanout
24+
buffer, size, and display format must be provided via EFI interfaces.
25+
1026
config DRM_OFDRM
1127
tristate "Open Firmware display driver"
1228
depends on DRM && MMU && OF && (PPC || COMPILE_TEST)

drivers/gpu/drm/sysfb/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
obj-$(CONFIG_DRM_SYSFB_HELPER) += drm_sysfb_helper.o
44

5+
obj-$(CONFIG_DRM_EFIDRM) += efidrm.o
56
obj-$(CONFIG_DRM_OFDRM) += ofdrm.o
67
obj-$(CONFIG_DRM_SIMPLEDRM) += simpledrm.o

0 commit comments

Comments
 (0)