From: Thomas Zimmermann <tzimmermann@suse.de>
To: simona@ffwll.ch, airlied@gmail.com, javierm@redhat.com,
jfalempe@redhat.com
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH v4 00/12] drm: Introduce DRM client library
Date: Mon, 14 Oct 2024 10:55:14 +0200 [thread overview]
Message-ID: <20241014085740.582287-1-tzimmermann@suse.de> (raw)
With the next DRM client coming soon (drm_log) and most of DRM's
fbdev emulation consolidated in a few places, it is time to provide
a single place for the clients.
The base client code and client event handling is now optional. It
still remains in the DRM core, which simplifies module dependencies.
The new module drm_client_lib.ko stores most of the in-kernel client
code. Drivers can opt into client support, but the presence of the
client module depends on the user's kernel configuration. Without
selected clients, no client module will be build.
DRM now forwards suspend and resume events to client helpers instead
of calling fbdev emulation directly. This breaks a cyclic dependency
among the involved modules. It also allows any client to process suspend
and resume events.
v4:
- improve commit descriptions (Jonathan)
v3:
- fix more corner Kconfig cases (kernel test robot)
v2:
- rework of the overall design
- keep base client code in DRM core
Thomas Zimmermann (12):
drm/i915: Select DRM_CLIENT_SELECTION
drm/xe: Select DRM_CLIENT_SELECTION
drm/fbdev-dma: Select FB_DEFERRED_IO
drm/fbdev: Select fbdev I/O helpers from modules that require them
drm/fbdev: Store fbdev module parameters in separate file
drm/client: Move client event handlers to drm_client_event.c
drm/client: Move suspend/resume into DRM client callbacks
drm/amdgpu: Suspend and resume internal clients with client helpers
drm/nouveau: Suspend and resume clients with client helpers
drm/radeon: Suspend and resume clients with client helpers
drm/client: Make client support optional
drm/client: Add client-lib module
Documentation/gpu/drm-client.rst | 3 +
drivers/gpu/drm/Kconfig | 41 +++-
drivers/gpu/drm/Makefile | 20 +-
drivers/gpu/drm/amd/amdgpu/Kconfig | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 +-
drivers/gpu/drm/drm_client.c | 121 -----------
drivers/gpu/drm/drm_client_event.c | 197 ++++++++++++++++++
drivers/gpu/drm/drm_client_setup.c | 3 +
drivers/gpu/drm/drm_debugfs.c | 1 -
drivers/gpu/drm/drm_drv.c | 2 +-
drivers/gpu/drm/drm_fb_helper.c | 31 ---
drivers/gpu/drm/drm_fbdev_client.c | 30 ++-
drivers/gpu/drm/drm_file.c | 2 +-
drivers/gpu/drm/drm_internal.h | 15 ++
drivers/gpu/drm/drm_kms_helper_common.c | 38 ++++
drivers/gpu/drm/drm_modeset_helper.c | 14 +-
drivers/gpu/drm/drm_probe_helper.c | 2 +-
drivers/gpu/drm/i915/Kconfig | 1 +
.../drm/i915/display/intel_display_driver.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_display.c | 8 +-
drivers/gpu/drm/nouveau/nouveau_vga.c | 2 +-
drivers/gpu/drm/radeon/radeon_device.c | 19 +-
drivers/gpu/drm/radeon/radeon_fbdev.c | 6 -
drivers/gpu/drm/radeon/radeon_mode.h | 3 -
drivers/gpu/drm/xe/Kconfig | 1 +
include/drm/drm_client.h | 41 +++-
include/drm/drm_client_event.h | 27 +++
27 files changed, 434 insertions(+), 219 deletions(-)
create mode 100644 drivers/gpu/drm/drm_client_event.c
create mode 100644 include/drm/drm_client_event.h
--
2.46.0
next reply other threads:[~2024-10-14 8:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 8:55 Thomas Zimmermann [this message]
2024-10-14 8:55 ` [PATCH v4 01/12] drm/i915: Select DRM_CLIENT_SELECTION Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 02/12] drm/xe: " Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 03/12] drm/fbdev-dma: Select FB_DEFERRED_IO Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 04/12] drm/fbdev: Select fbdev I/O helpers from modules that require them Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 05/12] drm/fbdev: Store fbdev module parameters in separate file Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 06/12] drm/client: Move client event handlers to drm_client_event.c Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 07/12] drm/client: Move suspend/resume into DRM client callbacks Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 08/12] drm/amdgpu: Suspend and resume internal clients with client helpers Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 09/12] drm/nouveau: Suspend and resume " Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 10/12] drm/radeon: " Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 11/12] drm/client: Make client support optional Thomas Zimmermann
2024-10-14 8:55 ` [PATCH v4 12/12] drm/client: Add client-lib module Thomas Zimmermann
2024-10-14 10:53 ` ✓ Fi.CI.BAT: success for drm: Introduce DRM client library (rev4) Patchwork
2024-10-14 12:43 ` ✗ Fi.CI.IGT: failure " Patchwork
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=20241014085740.582287-1-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=simona@ffwll.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox