drm: Provide helpers for system framebuffers and add efidrm/vesadrm
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest18 patches 0 repliesNew
- v218 patches 0 repliesSuperseded
- v118 patches 28 repliesSuperseded
Changes in v3 from the cover letter
- make EFI/VESA drivers depend on !SYSFB_SIMPLEFB (Javier)
- clear unsupported EDID extension field
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | drm/ofdrm: Remove struct ofdrm_device.pdevdrivers/ | +0 | 0 replies | |
| 2/18 | drm/ofdrm: Open-code drm_simple_encoder_init()drivers/ | +5 | 0 replies | |
| 3/18 | drm/simpledrm: Remove struct simpledrm_device.nformatsdrivers/ | +0 | 0 replies | |
| 4/18 | drm: Move sysfb drivers into separate subdirectoryMAINTAINERS drivers/ drivers/ +6 more | +46 | 0 replies | |
| 5/18 | drm/sysfb: Add struct drm_sysfb_devicedrivers/ drivers/ drivers/ +3 more | +135 | 0 replies | |
| 6/18 | drm/sysfb: Provide single mode-init helperdrivers/ drivers/ drivers/ +1 more | +31 | 0 replies | |
| 7/18 | drm/sysfb: Merge mode-config functionsdrivers/ drivers/ drivers/ | +11 | 0 replies | |
| 8/18 | drm/sysfb: Merge connector functionsdrivers/ drivers/ drivers/ +1 more | +33 | 0 replies | |
| 9/18 | drm/sysfb: Maintain CRTC state in struct drm_sysfb_crtc_statedrivers/ drivers/ drivers/ +1 more | +95 | 0 replies | |
| 10/18 | drm/sysfb: Merge CRTC functionsdrivers/ drivers/ drivers/ +1 more | +57 | 0 replies | |
| 11/18 | drm/sysfb: Merge primary-plane functionsdrivers/ drivers/ drivers/ +1 more | +187 | 0 replies | |
| 12/18 | drm/sysfb: ofdrm: Add EDID supportdrivers/ drivers/ drivers/ | +56 | 0 replies | |
| 13/18 | firmware: sysfb: Move bpp-depth calculation into screen_info helperdrivers/ drivers/ include/ | +39 | 0 replies | |
| 14/18 | drm/sysfb: Add efidrm for EFI displaysdrivers/ drivers/ drivers/ +1 more | +545 | 0 replies | |
| 15/18 | drm/sysfb: efidrm: Add EDID supportdrivers/ | +8 | 0 replies | |
| 16/18 | drm/sysfb: Add vesadrm for VESA displaysdrivers/ drivers/ drivers/ | +465 | 0 replies | |
| 17/18 | drm/sysfb: vesadrm: Add EDID supportdrivers/ | +8 | 0 replies | |
| 18/18 | drm/sysfb: vesadrm: Add gamma correctiondrivers/ include/ | +213 | 0 replies |
Reviews trailers per patch
All 18 patches have a Reviewed-by or Acked-by.
| Patch | Javier Martinez Canillas |
|---|---|
| 1/18 | R-b |
| 2/18 | R-b |
| 3/18 | R-b |
| 4/18 | R-b |
| 5/18 | R-b |
| 6/18 | R-b |
| 7/18 | R-b |
| 8/18 | R-b |
| 9/18 | R-b |
| 10/18 | R-b |
| 11/18 | R-b |
| 12/18 | R-b |
| 13/18 | R-b |
| 14/18 | R-b |
| 15/18 | R-b |
| 16/18 | R-b |
| 17/18 | R-b |
| 18/18 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/18] drm: Provide helpers for system framebuffers and add efidrm/vesadrm
This series simplifies the existing ofdrm and simepldrm drivers, and adds new drivers for EFI- and VESA-based framebuffers. Existing drivers for system framebuffers, ofdrm and simpledrm, share much of their mode-setting pipeline. The major difference between the two drivers is in how they retrieve the framebuffer from the systems. Hence, it makes sense to share some of the pipeline implementation. With the shared helpers in place, we can then add dedicated drivers for EFI and VESA easily.
Patches 1 to 3 clean up obsolete artifacts in ofdrm and simpledrm.
Patch 4 moves both drivers from tiny/ into their own subdirectory sysfb/. The name aligns with the naming in drivers/firmware/sysfb.c to signal the connection. It's the firmware code that creates most of the system-framebuffer devices that these drivers operate on. The patch also adds a separate menu in Kconfig.
Patches 5 to 11 unify the mode-setting pipeline between ofdrm and simpledrm. Either both drivers already use the same implementation or they can easily do so. There've been previous attempts to unify some of the drivers' code, but with little success. This time the helpers will be shared among 4 drivers, so it's already much more successful than before.
Patch 12 adds EDID support to ofdrm. The EDID data can be found in some Macintosh's DeviceTree next to the framebuffer configuration. EDID support will be useful for EFI and VESA as well.
Patch 13 adds another helper for screen_info that will be required by EFI and VESA drivers.
Patch 14 and 15 add efidrm, a DRM driver that operates on EFI-provided framebuffers. It uses the shared sysfb helpers. The immediate benefit over simpledrm is the support for EFI's various types of memory caching on the framebuffer. Simpledrm only supported WriteCombine caching. There's also EDID support if the kernel's edid_info has been initialized. This feature needs to be implemented in the kernel's efistub library.
Patches 16 to 18 add vesadrm, a DRM driver that operates on VESA- provided framebuffers. It is very much like efidrm, but tailored towards VESA features. It has EDID support and there's a patch at [1] for Grub to provide the data as part of the kernel's boot parameters. Vesadrm also supports gamma ramps. Together with EDID, this allows for gamma correction and night mode. Gnome already does that.
Future directions: Efidrm requires EDID data that has to be provided by the efistub library. There is an EFI call to do so. Vesadrm currently requires a discrete color mode. Support for palette modes can be added later. There's still a bit of code duplication among palette handling. We have more drivers that use similar code for palette LUTs, such as ast and mgag200. We should try to provide generic palette helpers for all these drivers.
This series has been tested on various devices that require the provided drivers.
v3:
- make EFI/VESA drivers depend on !SYSFB_SIMPLEFB (Javier)
- clear unsupported EDID extension field
v2:
- simplify EDID logic (Jani)
- use CONFIG_X86_32 instead of __i386__
Thomas Zimmermann (18):
drm/ofdrm: Remove struct ofdrm_device.pdev
drm/ofdrm: Open-code drm_simple_encoder_init() drm/simpledrm: Remove struct simpledrm_device.nformats
drm: Move sysfb drivers into separate subdirectory drm/sysfb: Add struct drm_sysfb_device
drm/sysfb: Provide single mode-init helper
drm/sysfb: Merge mode-config functions
drm/sysfb: Merge connector functions
drm/sysfb: Maintain CRTC state in struct drm_sysfb_crtc_state drm/sysfb: Merge CRTC functions
drm/sysfb: Merge primary-plane functions
drm/sysfb: ofdrm: Add EDID support
firmware: sysfb: Move bpp-depth calculation into screen_info helper drm/sysfb: Add efidrm for EFI displays
drm/sysfb: efidrm: Add EDID support
drm/sysfb: Add vesadrm for VESA displays
drm/sysfb: vesadrm: Add EDID support
drm/sysfb: vesadrm: Add gamma correction
MAINTAINERS | 3 +-
drivers/firmware/sysfb_simplefb.c | 31 +-
drivers/gpu/drm/Kconfig | 2 +
drivers/gpu/drm/Makefile | 1 +
drivers/gpu/drm/sysfb/Kconfig | 76 +++
drivers/gpu/drm/sysfb/Makefile | 8 +
drivers/gpu/drm/sysfb/drm_sysfb_helper.c | 324 ++++++++++
drivers/gpu/drm/sysfb/drm_sysfb_helper.h | 136 ++++
drivers/gpu/drm/sysfb/efidrm.c | 495 +++++++++++++++
drivers/gpu/drm/{tiny => sysfb}/ofdrm.c | 364 ++---------
drivers/gpu/drm/{tiny => sysfb}/simpledrm.c | 237 +------
drivers/gpu/drm/sysfb/vesadrm.c | 662 ++++++++++++++++++++
drivers/gpu/drm/tiny/Kconfig | 32 -
drivers/gpu/drm/tiny/Makefile | 2 -
drivers/video/screen_info_generic.c | 36 ++
include/linux/screen_info.h | 9 +
include/video/pixel_format.h | 41 ++
17 files changed, 1892 insertions(+), 567 deletions(-)
create mode 100644 drivers/gpu/drm/sysfb/Kconfig
create mode 100644 drivers/gpu/drm/sysfb/Makefile
create mode 100644 drivers/gpu/drm/sysfb/drm_sysfb_helper.c
create mode 100644 drivers/gpu/drm/sysfb/drm_sysfb_helper.h
create mode 100644 drivers/gpu/drm/sysfb/efidrm.c
rename drivers/gpu/drm/{tiny => sysfb}/ofdrm.c (75%)
rename drivers/gpu/drm/{tiny => sysfb}/simpledrm.c (76%)
create mode 100644 drivers/gpu/drm/sysfb/vesadrm.c
create mode 100644 include/video/pixel_format.hSignature · 1 line
2.49.0