* [PATCH] drm: select DRM_KMS_HELPER from DRM_GEM_SHMEM_HELPER
@ 2025-01-22 6:46 Arnd Bergmann
2025-01-22 7:53 ` Thomas Zimmermann
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2025-01-22 6:46 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter
Cc: Arnd Bergmann, Jocelyn Falempe, Jani Nikula, Geert Uytterhoeven,
dri-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
In the combination of DRM_KMS_HELPER=m, DRM_GEM_SHMEM_HELPER=y, DRM_FBDEV_EMULATION=y,
The shmem code fails to link against the KMS helpers:
x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_driver_fbdev_probe':
(.text+0xeec601): undefined reference to `drm_fb_helper_alloc_info'
x86_64-linux-ld: (.text+0xeec633): undefined reference to `drm_fb_helper_fill_info'
x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_get_page':
drm_fbdev_shmem.c:(.text+0xeec7d2): undefined reference to `drm_gem_fb_get_obj'
x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_fb_mmap':
drm_fbdev_shmem.c:(.text+0xeec9f6): undefined reference to `drm_gem_fb_get_obj'
x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_defio_imageblit':
(.rodata+0x5b2288): undefined reference to `drm_fb_helper_check_var'
x86_64-linux-ld: (.rodata+0x5b2290): undefined reference to `drm_fb_helper_set_par'
This can happen for a number of device drivers that select DRM_GEM_SHMEM_HELPER
without also selecting DRM_KMS_HELPER. To work around this, add another select
that forces DRM_KMS_HELPER to be built-in rather than a loadable module, but
only if FBDEV emulation is also enabled.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 0fe99d440bfa..a8d2dffbc82f 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -311,6 +311,7 @@ config DRM_GEM_SHMEM_HELPER
depends on DRM && MMU
select FB_CORE if DRM_FBDEV_EMULATION
select FB_SYSMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
+ select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
help
Choose this if you need the GEM shmem helper functions
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: select DRM_KMS_HELPER from DRM_GEM_SHMEM_HELPER
2025-01-22 6:46 [PATCH] drm: select DRM_KMS_HELPER from DRM_GEM_SHMEM_HELPER Arnd Bergmann
@ 2025-01-22 7:53 ` Thomas Zimmermann
2025-01-22 8:09 ` Marc Kleine-Budde
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Zimmermann @ 2025-01-22 7:53 UTC (permalink / raw)
To: Arnd Bergmann, Maarten Lankhorst, Maxime Ripard, David Airlie,
Simona Vetter
Cc: Arnd Bergmann, Jocelyn Falempe, Jani Nikula, Geert Uytterhoeven,
dri-devel, linux-kernel
Hi
thanks for the patch.
Am 22.01.25 um 07:46 schrieb Arnd Bergmann:
> From: Arnd Bergmann <arnd@arndb.de>
>
> In the combination of DRM_KMS_HELPER=m, DRM_GEM_SHMEM_HELPER=y, DRM_FBDEV_EMULATION=y,
> The shmem code fails to link against the KMS helpers:
>
> x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_driver_fbdev_probe':
> (.text+0xeec601): undefined reference to `drm_fb_helper_alloc_info'
> x86_64-linux-ld: (.text+0xeec633): undefined reference to `drm_fb_helper_fill_info'
> x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_get_page':
> drm_fbdev_shmem.c:(.text+0xeec7d2): undefined reference to `drm_gem_fb_get_obj'
> x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_fb_mmap':
> drm_fbdev_shmem.c:(.text+0xeec9f6): undefined reference to `drm_gem_fb_get_obj'
> x86_64-linux-ld: vmlinux.o: in function `drm_fbdev_shmem_defio_imageblit':
> (.rodata+0x5b2288): undefined reference to `drm_fb_helper_check_var'
> x86_64-linux-ld: (.rodata+0x5b2290): undefined reference to `drm_fb_helper_set_par'
>
> This can happen for a number of device drivers that select DRM_GEM_SHMEM_HELPER
> without also selecting DRM_KMS_HELPER. To work around this, add another select
> that forces DRM_KMS_HELPER to be built-in rather than a loadable module, but
> only if FBDEV emulation is also enabled.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
with comments below.
> ---
> drivers/gpu/drm/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 0fe99d440bfa..a8d2dffbc82f 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -311,6 +311,7 @@ config DRM_GEM_SHMEM_HELPER
I expect that DRM_GEM_DMA_HELPER and DRM_GEM_VRAM_HELPER are also affected.
> depends on DRM && MMU
> select FB_CORE if DRM_FBDEV_EMULATION
> select FB_SYSMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
> + select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
Maybe move the new line before the lines with FB_ to keep it sorted
alphabetically.
I think this patch fixes
https://lore.kernel.org/dri-devel/a5a98971-405e-496b-89a4-75a61fd6d898@suse.de/T/#mcc9fa26b2980b93dc688061884119a3dd0277dc5
Could you please add Closes and Reported-by tags?
Best regards
Thomas
> help
> Choose this if you need the GEM shmem helper functions
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: select DRM_KMS_HELPER from DRM_GEM_SHMEM_HELPER
2025-01-22 7:53 ` Thomas Zimmermann
@ 2025-01-22 8:09 ` Marc Kleine-Budde
0 siblings, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2025-01-22 8:09 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: Arnd Bergmann, Maarten Lankhorst, Maxime Ripard, David Airlie,
Simona Vetter, Arnd Bergmann, Jocelyn Falempe, Jani Nikula,
Geert Uytterhoeven, dri-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
On 22.01.2025 08:53:40, Thomas Zimmermann wrote:
[...]
> I think this patch fixes
>
> https://lore.kernel.org/dri-devel/a5a98971-405e-496b-89a4-75a61fd6d898@suse.de/T/#mcc9fa26b2980b93dc688061884119a3dd0277dc5
Yes it does! \o/
> Could you please add Closes and Reported-by tags?
Closes: https://lore.kernel.org/all/20250121-greedy-flounder-of-abundance-4d2ee8-mkl@pengutronix.de
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-22 8:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-22 6:46 [PATCH] drm: select DRM_KMS_HELPER from DRM_GEM_SHMEM_HELPER Arnd Bergmann
2025-01-22 7:53 ` Thomas Zimmermann
2025-01-22 8:09 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox