drm/client: Add client-lib module
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Oct 2024 08:55:26 +0000 (10:55 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 18 Oct 2024 07:25:51 +0000 (09:25 +0200)
commitdadd28d4142f9ad39eefb7b45ee7518bd4d2459c
tree883d6577ed65c2f485c956490e97aeb8c36dd068
parent1f828b4dd40264028d9b481c0412e63837d968f6
drm/client: Add client-lib module

Add drm_client_lib.ko to contain DRM's built-in client. Move the
existing client for fbdev emulation into the new module. Protect the
new module behind CONFIG_DRM_CLIENT_LIB.

The Kconfig rules separate the DRM drivers from the DRM clients. A
driver can opt into the default clients, but the user configures
each client individually. To do so, DRM drivers still select
DRM_CLIENT_SELECTION. The option is now a tristate that further
selects all dependencies of the enabled DRM clients. There's
a menu option for each client. Enabling at least one client also
selects DRM_CLIENT_SETUP, so that drivers call drm_client_setup().
New DRM clients should depend on DRM_CLIENT_SELECTION.

There are existing kernel options in drm_fb_helper.o, so leave this
file in the KMS-helper module for now.

v5:
- leave fbdev helpers in drm_kms_helper.ko for now
v3:
- fix commit changelog
v2:
- keep client code in core
- protect lib with DRM_CLIENT_LIB
- remove duplicate line from Makefile (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241014085740.582287-13-tzimmermann@suse.de
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/drm_client_setup.c