From: nerdopolis <bluescreen_avenger@verizon.net>
To: javierm@redhat.com, simona@ffwll.ch, airlied@gmail.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
dri-devel@lists.freedesktop.org
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 00/18] drm: Provide helpers for system framebuffers and add efidrm/vesadrm
Date: Wed, 19 Mar 2025 08:50:04 -0400 [thread overview]
Message-ID: <7990728.29KlJPOoH8@nerdopolis2> (raw)
In-Reply-To: <20250319083021.6472-1-tzimmermann@suse.de>
On Wednesday, March 19, 2025 3:44:59 AM EDT Thomas Zimmermann wrote:
> 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 from 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 in 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.
>
> [1] https://build.opensuse.org/projects/home:tdz:branches:Base:System/packages/grub2/files/grub2-provide-edid.patch?expand=1
>
> 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 | 319 ++++++++++
> 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 | 660 ++++++++++++++++++++
> 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, 1885 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.h
>
>
FYI When this gets merged,
https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xfree86/common/xf86platformBus.c?ref_type=heads#L589
might need to be updated to add exceptions for vesadrm and efidrm like there
is for simpledrm.
I am willing to open a merge request, but freedesktop is readonly for now
during their migration.
next prev parent reply other threads:[~2025-03-19 12:50 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 7:44 [PATCH 00/18] drm: Provide helpers for system framebuffers and add efidrm/vesadrm Thomas Zimmermann
2025-03-19 7:45 ` [PATCH 01/18] drm/ofdrm: Remove struct ofdrm_device.pdev Thomas Zimmermann
2025-03-23 10:10 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 02/18] drm/ofdrm: Open-code drm_simple_encoder_init() Thomas Zimmermann
2025-03-23 10:12 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 03/18] drm/simpledrm: Remove struct simpledrm_device.nformats Thomas Zimmermann
2025-03-23 10:17 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 04/18] drm: Move sysfb drivers into separate subdirectory Thomas Zimmermann
2025-03-23 10:21 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 05/18] drm/sysfb: Add struct drm_sysfb_device Thomas Zimmermann
2025-03-23 10:39 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 06/18] drm/sysfb: Provide single mode-init helper Thomas Zimmermann
2025-03-23 10:41 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 07/18] drm/sysfb: Merge mode-config functions Thomas Zimmermann
2025-03-23 10:47 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 08/18] drm/sysfb: Merge connector functions Thomas Zimmermann
2025-03-23 10:57 ` Javier Martinez Canillas
2025-03-24 7:37 ` Thomas Zimmermann
2025-03-24 8:53 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 09/18] drm/sysfb: Maintain CRTC state in struct drm_sysfb_crtc_state Thomas Zimmermann
2025-03-31 8:08 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 10/18] drm/sysfb: Merge CRTC functions Thomas Zimmermann
2025-03-31 9:00 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 11/18] drm/sysfb: Merge primary-plane functions Thomas Zimmermann
2025-03-31 9:12 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 12/18] drm/sysfb: ofdrm: Add EDID support Thomas Zimmermann
2025-03-20 12:50 ` Jani Nikula
2025-03-20 13:08 ` Thomas Zimmermann
2025-03-31 9:26 ` Maxime Ripard
2025-03-31 9:32 ` Thomas Zimmermann
2025-03-31 9:15 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 13/18] firmware: sysfb: Move bpp-depth calculation into screen_info helper Thomas Zimmermann
2025-03-31 9:24 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 14/18] drm/sysfb: Add efidrm for EFI displays Thomas Zimmermann
2025-03-31 9:35 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 15/18] drm/sysfb: efidrm: Add EDID support Thomas Zimmermann
2025-03-31 9:37 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 16/18] drm/sysfb: Add vesadrm for VESA displays Thomas Zimmermann
2025-03-31 9:42 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 17/18] drm/sysfb: vesadrm: Add EDID support Thomas Zimmermann
2025-03-31 9:44 ` Javier Martinez Canillas
2025-03-19 7:45 ` [PATCH 18/18] drm/sysfb: vesadrm: Add gamma correction Thomas Zimmermann
2025-03-31 9:47 ` Javier Martinez Canillas
2025-03-19 12:50 ` nerdopolis [this message]
2025-03-19 12:59 ` [PATCH 00/18] drm: Provide helpers for system framebuffers and add efidrm/vesadrm Thomas Zimmermann
2025-03-31 13:39 ` Thomas Zimmermann
2025-04-02 2:44 ` nerdopolis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7990728.29KlJPOoH8@nerdopolis2 \
--to=bluescreen_avenger@verizon.net \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.