Am 24.09.26 um 11:43 schrieb [email protected]:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s)
to consider:
- [Low] drm: missing DRM_CLIENT_LIB selection in memory helpers causes linker
error
--
commit b0f3c606cfc59f0c56cd9be7e3349abc72f97a64
Author: Thomas Zimmermann <[email protected]>
drm/fbdev: Move fbdev helpers into client library
DRM's fbdev helpers are for the fbdev-emulation clients. Move them
into the client-library module. Fix include statements throughout
DRM drivers.
diff --git a/drivers/gpu/drm/clients/Makefile b/drivers/gpu/drm/clients/Makefile
index c16addbc327f0..1304ff358509d 100644
--- a/drivers/gpu/drm/clients/Makefile
+++ b/drivers/gpu/drm/clients/Makefile
@@ -4,5 +4,6 @@ subdir-ccflags-y += -I$(src)/..
drm_client_lib-y := drm_client_setup.o
drm_client_lib-$(CONFIG_DRM_CLIENT_LOG) += drm_log.o
-drm_client_lib-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_client.o
+drm_client_lib-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_client.o \
+ drm_fbdev_helper.o
[Severity: Low]
Since drm_fbdev_helper.o is now built into drm_client_lib, can this cause a
linker error for built-in memory helpers?
If CONFIG_DRM_FBDEV_EMULATION=y and a driver selects DRM_GEM_DMA_HELPER=y,
but CONFIG_DRM_CLIENT_SELECTION=m (selected only by modular drivers),
drm_client_lib.ko will be built as a module while drm_fbdev_dma.o becomes
built-in.
This would lead to undefined references to fbdev helper functions (e.g.,
drm_fb_helper_fini) during vmlinux linkage.
Do the memory helpers in drivers/gpu/drm/Kconfig (DRM_GEM_DMA_HELPER,
DRM_GEM_SHMEM_HELPER, DRM_TTM_HELPER) need to explicitly select
DRM_CLIENT_LIB when DRM_FBDEV_EMULATION is enabled to prevent this?
To answer that question: yes they do. And I forgot that they already do
the same for DRM_KMS_HELPER because of this dependency. [1] The
KMS-helper rule simply needs to be replaced with the client-lib. The
memory managers do not use the three module parameters that remain in
drm_kms_helper.ko . No need for a dependency there.
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)