From: Arnd Bergmann <arnd@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Arnd Bergmann <arnd@arndb.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Jocelyn Falempe <jfalempe@redhat.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Jani Nikula <jani.nikula@intel.com>,
Harry Wentland <harry.wentland@amd.com>,
Masahiro Yamada <masahiroy@kernel.org>,
Jonathan Cavitt <jonathan.cavitt@intel.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm: rework FB_CORE dependency
Date: Fri, 15 Nov 2024 16:27:10 +0100 [thread overview]
Message-ID: <20241115152722.3537630-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
The 'select FB_CORE' statement moved from CONFIG_DRM to DRM_CLIENT_LIB,
but there are now configurations that have code calling into fb_core
as built-in even though the client_lib itself is a loadable module:
x86_64-linux-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_driver_fbdev_probe':
drm_fbdev_shmem.c:(.text+0x1fc): undefined reference to `fb_deferred_io_init'
x86_64-linux-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_fb_destroy':
drm_fbdev_shmem.c:(.text+0x2e1): undefined reference to `fb_deferred_io_cleanup'
x86_64-linux-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_fb_mmap':
drm_fbdev_shmem.c:(.text+0x34c): undefined reference to `fb_deferred_io_mmap'
x86_64-linux-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_imageblit':
drm_fbdev_shmem.c:(.text+0x35f): undefined reference to `sys_imageblit'
x86_64-linux-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_copyarea':
drm_fbdev_shmem.c:(.text+0x38b): undefined reference to `sys_copyarea'
x86_64-linux-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_fillrect':
drm_fbdev_shmem.c:(.text+0x3b7): undefined reference to `sys_fillrect'
x86_64-linux-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_write':
drm_fbdev_shmem.c:(.text+0x3e9): undefined reference to `fb_sys_write'
x86_64-linux-ld: drivers/gpu/drm/drm_fbdev_shmem.o: in function `drm_fbdev_shmem_defio_read':
drm_fbdev_shmem.c:(.text+0x413): undefined reference to `fb_sys_read'
x86_64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend':
drm_fb_helper.c:(.text+0x2c6): undefined reference to `fb_set_suspend'
x86_64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_resume_worker':
drm_fb_helper.c:(.text+0x2e1): undefined reference to `fb_set_suspend'
x86_64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_alloc_info':
drm_fb_helper.c:(.text+0x33a): undefined reference to `framebuffer_alloc'
x86_64-linux-ld: drm_fb_helper.c:(.text+0x359): undefined reference to `fb_alloc_cmap'
x86_64-linux-ld: drm_fb_helper.c:(.text+0x368): undefined reference to `framebuffer_release'
x86_64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_release_info':
drm_fb_helper.c:(.text+0x3a4): undefined reference to `fb_dealloc_cmap'
x86_64-linux-ld: drm_fb_helper.c:(.text+0x3ab): undefined reference to `framebuffer_release'
x86_64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_unregister_info':
drm_fb_helper.c:(.text+0x3bb): undefined reference to `unregister_framebuffer'
x86_64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `__drm_fb_helper_initial_config_and_unlock':
drm_fb_helper.c:(.text+0xb6d): undefined reference to `register_framebuffer'
x86_64-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend_unlocked':
drm_fb_helper.c:(.text+0x167a): undefined reference to `fb_set_suspend'
Since the code that calls into fb_core is not actually in the client_lib
module but in other helper libraries, move the 'select' again to the
places that actually call into fb_core, in this case DRM_GEM_SHMEM_HELPER
and DRM_KMS_HELPER.
Fixes: dadd28d4142f ("drm/client: Add client-lib module")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I have only given this light build testing. It seems sensible on the surface,
but there is a chance that there are additional helpers that need the same
'select'. Moving it into CONFIG_DRM itself would be the safer option, but
that seems to defeat the purpose of the client-lib module.
---
drivers/gpu/drm/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index a4a092ee70d9..4f21bff6282a 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -98,6 +98,7 @@ config DRM_KUNIT_TEST
config DRM_KMS_HELPER
tristate
depends on DRM
+ select FB_CORE if DRM_FBDEV_EMULATION
help
CRTC helpers for KMS drivers.
@@ -220,7 +221,6 @@ config DRM_CLIENT_LIB
tristate
depends on DRM
select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
- select FB_CORE if DRM_FBDEV_EMULATION
help
This option enables the DRM client library and selects all
modules and components according to the enabled clients.
@@ -372,6 +372,7 @@ config DRM_GEM_SHMEM_HELPER
tristate
depends on DRM && MMU
select FB_SYSMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
+ select FB_CORE if DRM_FBDEV_EMULATION
help
Choose this if you need the GEM shmem helper functions
--
2.39.5
next reply other threads:[~2024-11-15 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 15:27 Arnd Bergmann [this message]
2024-11-15 15:54 ` [PATCH] drm: rework FB_CORE dependency Thomas Zimmermann
2024-11-15 16:35 ` Arnd Bergmann
2024-11-17 5:04 ` kernel test robot
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=20241115152722.3537630-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=airlied@gmail.com \
--cc=arnd@arndb.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=harry.wentland@amd.com \
--cc=jani.nikula@intel.com \
--cc=jfalempe@redhat.com \
--cc=jonathan.cavitt@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=masahiroy@kernel.org \
--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.