* [PATCH v2 0/2] drm/fbdev: Move helpers to clients/ subdirectory
@ 2026-09-24 9:29 Thomas Zimmermann
2026-09-24 9:29 ` [PATCH v2 1/2] drm/fbdev: Move fbdev module parameters next to module init Thomas Zimmermann
2026-09-24 9:29 ` [PATCH v2 2/2] drm/fbdev: Move fbdev helpers into client library Thomas Zimmermann
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2026-09-24 9:29 UTC (permalink / raw)
To: jfalempe, javierm, maarten.lankhorst, mripard, airlied, simona,
jani.nikula, Alexander.Deucher
Cc: dri-devel, amd-gfx, linux-arm-kernel, linux-samsung-soc,
intel-gfx, intel-xe, linux-arm-msm, freedreno, nouveau,
linux-rockchip, linux-tegra, sashiko-reviews, Thomas Zimmermann
Helpers for fbdev emulation are still linked into drm_kms_helper.ko,
which is for mode setting. Move the source and header files to the
clients/ subdirectory and link them into drm_client_lib.ko. This has
some fallout throughout drivers, but it's all trivial.
There are 3 module parameters to drm_kms_helper.ko that control fbdev
emulation. For compatibility with existing installations, leave them
in this module.
v2:
- update armada and docs
Thomas Zimmermann (2):
drm/fbdev: Move fbdev module parameters next to module init
drm/fbdev: Move fbdev helpers into client library
Documentation/gpu/drm-kms-helpers.rst | 6 +--
drivers/gpu/drm/Makefile | 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
drivers/gpu/drm/armada/armada_fbdev.c | 2 +-
drivers/gpu/drm/clients/Makefile | 3 +-
drivers/gpu/drm/clients/drm_fbdev_client.c | 2 +-
.../drm_fbdev_helper.c} | 34 +---------------
drivers/gpu/drm/drm_crtc_helper_internal.h | 9 +++++
drivers/gpu/drm/drm_fbdev_dma.c | 2 +-
drivers/gpu/drm/drm_fbdev_shmem.c | 2 +-
drivers/gpu/drm/drm_fbdev_ttm.c | 2 +-
drivers/gpu/drm/drm_kms_helper_common.c | 39 +++++++++++++++++++
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +-
drivers/gpu/drm/gma500/fbdev.c | 2 +-
drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +-
drivers/gpu/drm/msm/msm_debugfs.c | 2 +-
drivers/gpu/drm/msm/msm_fbdev.c | 2 +-
drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 -
drivers/gpu/drm/omapdrm/omap_debugfs.c | 2 +-
drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +-
drivers/gpu/drm/radeon/radeon_device.c | 2 +-
drivers/gpu/drm/radeon/radeon_fbdev.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 2 +-
drivers/gpu/drm/sitronix/st7571.c | 1 -
drivers/gpu/drm/tegra/fbdev.c | 2 +-
drivers/gpu/drm/vboxvideo/vbox_mode.c | 2 +-
.../drm_fbdev_helper.h} | 4 +-
28 files changed, 76 insertions(+), 60 deletions(-)
rename drivers/gpu/drm/{drm_fb_helper.c => clients/drm_fbdev_helper.c} (97%)
rename include/drm/{drm_fb_helper.h => clients/drm_fbdev_helper.h} (99%)
base-commit: ff831af91674990f9f1814340860e96943d5df1a
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] drm/fbdev: Move fbdev module parameters next to module init
2026-09-24 9:29 [PATCH v2 0/2] drm/fbdev: Move helpers to clients/ subdirectory Thomas Zimmermann
@ 2026-09-24 9:29 ` Thomas Zimmermann
2026-09-24 9:29 ` [PATCH v2 2/2] drm/fbdev: Move fbdev helpers into client library Thomas Zimmermann
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2026-09-24 9:29 UTC (permalink / raw)
To: jfalempe, javierm, maarten.lankhorst, mripard, airlied, simona,
jani.nikula, Alexander.Deucher
Cc: dri-devel, amd-gfx, linux-arm-kernel, linux-samsung-soc,
intel-gfx, intel-xe, linux-arm-msm, freedreno, nouveau,
linux-rockchip, linux-tegra, sashiko-reviews, Thomas Zimmermann,
Alex Deucher
Define the parameters for fbdev emulation in the source file with the
module-initialization and exit code of drm_kms_helper.ko. The parameters
control some aspects of DRM's fbdev emulation. Common usage looks like
drm_kms_helper.drm_fbdev_overalloc=200
on the kernel's command line. This has been possible for many years
and changing it would likely upset users.
The emulation code is supposed to be moved into the module for DRM
clients. Keeping the parameters in drm_kms_helper.ko avoids breaking
systems the use them in the way described above.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/drm_crtc_helper_internal.h | 9 +++++
drivers/gpu/drm/drm_fb_helper.c | 32 +-----------------
drivers/gpu/drm/drm_kms_helper_common.c | 39 ++++++++++++++++++++++
3 files changed, 49 insertions(+), 31 deletions(-)
diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h
index bae73936acf9..adcc9a2e24ee 100644
--- a/drivers/gpu/drm/drm_crtc_helper_internal.h
+++ b/drivers/gpu/drm/drm_crtc_helper_internal.h
@@ -29,6 +29,8 @@
#ifndef __DRM_CRTC_HELPER_INTERNAL_H__
#define __DRM_CRTC_HELPER_INTERNAL_H__
+#include <linux/types.h>
+
enum drm_mode_status;
struct drm_connector;
struct drm_crtc;
@@ -36,6 +38,13 @@ struct drm_display_mode;
struct drm_encoder;
struct drm_modeset_acquire_ctx;
+/* drm_kms_helper_common.c */
+#if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
+extern bool drm_fbdev_emulation;
+extern int drm_fbdev_overalloc;
+extern bool drm_leak_fbdev_smem;
+#endif
+
/* drm_probe_helper.c */
enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc,
const struct drm_display_mode *mode);
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index d4664ed468b2..76195410db60 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -43,39 +43,9 @@
#include <drm/drm_vblank.h>
#include "drm_internal.h"
+#include "drm_crtc_helper_internal.h"
#include "drm_crtc_internal.h"
-static bool drm_fbdev_emulation = true;
-module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600);
-MODULE_PARM_DESC(fbdev_emulation,
- "Enable legacy fbdev emulation [default=true]");
-
-static int drm_fbdev_overalloc = CONFIG_DRM_FBDEV_OVERALLOC;
-module_param(drm_fbdev_overalloc, int, 0444);
-MODULE_PARM_DESC(drm_fbdev_overalloc,
- "Overallocation of the fbdev buffer (%) [default="
- __MODULE_STRING(CONFIG_DRM_FBDEV_OVERALLOC) "]");
-
-/*
- * In order to keep user-space compatibility, we want in certain use-cases
- * to keep leaking the fbdev physical address to the user-space program
- * handling the fbdev buffer.
- *
- * This is a bad habit, essentially kept to support closed-source OpenGL
- * drivers that should really be moved into open-source upstream projects
- * instead of using legacy physical addresses in user space to communicate
- * with other out-of-tree kernel modules.
- *
- * This module_param *should* be removed as soon as possible and be
- * considered as a broken and legacy behaviour from a modern fbdev device.
- */
-static bool drm_leak_fbdev_smem;
-#if IS_ENABLED(CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM)
-module_param_unsafe(drm_leak_fbdev_smem, bool, 0600);
-MODULE_PARM_DESC(drm_leak_fbdev_smem,
- "Allow unsafe leaking fbdev physical smem address [default=false]");
-#endif
-
/**
* DOC: fbdev helpers
*
diff --git a/drivers/gpu/drm/drm_kms_helper_common.c b/drivers/gpu/drm/drm_kms_helper_common.c
index b5d5b469b444..1e55ecac4698 100644
--- a/drivers/gpu/drm/drm_kms_helper_common.c
+++ b/drivers/gpu/drm/drm_kms_helper_common.c
@@ -25,10 +25,49 @@
*
*/
+#include <linux/export.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include "drm_crtc_helper_internal.h"
#include "drm_panic_internal.h"
+#if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
+bool drm_fbdev_emulation = true;
+EXPORT_SYMBOL(drm_fbdev_emulation);
+module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600);
+MODULE_PARM_DESC(fbdev_emulation, "Enable legacy fbdev emulation [default=true]");
+
+int drm_fbdev_overalloc = CONFIG_DRM_FBDEV_OVERALLOC;
+EXPORT_SYMBOL(drm_fbdev_overalloc);
+module_param(drm_fbdev_overalloc, int, 0444);
+MODULE_PARM_DESC(drm_fbdev_overalloc,
+ "Overallocation of the fbdev buffer (%) [default="
+ __MODULE_STRING(CONFIG_DRM_FBDEV_OVERALLOC) "]");
+
+/*
+ * In order to keep user-space compatibility, we want in certain use-cases
+ * to keep leaking the fbdev physical address to the user-space program
+ * handling the fbdev buffer.
+ *
+ * This is a bad habit, essentially kept to support closed-source OpenGL
+ * drivers that should really be moved into open-source upstream projects
+ * instead of using legacy physical addresses in user space to communicate
+ * with other out-of-tree kernel modules.
+ *
+ * This module_param *should* be removed as soon as possible and be
+ * considered as a broken and legacy behaviour from a modern fbdev device.
+ */
+bool drm_leak_fbdev_smem;
+EXPORT_SYMBOL(drm_leak_fbdev_smem);
+#if IS_ENABLED(CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM)
+module_param_unsafe(drm_leak_fbdev_smem, bool, 0600);
+MODULE_PARM_DESC(drm_leak_fbdev_smem,
+ "Allow unsafe leaking fbdev physical smem address [default=false]");
+#endif
+
+#endif
+
static int __init drm_kms_helper_init(void)
{
return drm_panic_helper_init();
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] drm/fbdev: Move fbdev helpers into client library
2026-09-24 9:29 [PATCH v2 0/2] drm/fbdev: Move helpers to clients/ subdirectory Thomas Zimmermann
2026-09-24 9:29 ` [PATCH v2 1/2] drm/fbdev: Move fbdev module parameters next to module init Thomas Zimmermann
@ 2026-09-24 9:29 ` Thomas Zimmermann
2026-09-24 9:43 ` sashiko-bot
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2026-09-24 9:29 UTC (permalink / raw)
To: jfalempe, javierm, maarten.lankhorst, mripard, airlied, simona,
jani.nikula, Alexander.Deucher
Cc: dri-devel, amd-gfx, linux-arm-kernel, linux-samsung-soc,
intel-gfx, intel-xe, linux-arm-msm, freedreno, nouveau,
linux-rockchip, linux-tegra, sashiko-reviews, Thomas Zimmermann,
Alex Deucher, Jani Nikula
DRM's fbdev helpers are for the fbdev-emulation clients. Move them
into the client-library module. Fix include statements throughout
DRM drivers.
While at it, rename the files from drm_fb_helper to drm_fbdev_helper.
The old name was too reminiscent of DRM's framebuffer code.
The GEM support code for fbdev remains part of DRM's memory managers.
v2:
- update armada und docs
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
---
Documentation/gpu/drm-kms-helpers.rst | 6 +++---
drivers/gpu/drm/Makefile | 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
drivers/gpu/drm/armada/armada_fbdev.c | 2 +-
drivers/gpu/drm/clients/Makefile | 3 ++-
drivers/gpu/drm/clients/drm_fbdev_client.c | 2 +-
.../gpu/drm/{drm_fb_helper.c => clients/drm_fbdev_helper.c} | 2 +-
drivers/gpu/drm/drm_fbdev_dma.c | 2 +-
drivers/gpu/drm/drm_fbdev_shmem.c | 2 +-
drivers/gpu/drm/drm_fbdev_ttm.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +-
drivers/gpu/drm/gma500/fbdev.c | 2 +-
drivers/gpu/drm/i915/display/intel_fbdev.c | 2 +-
drivers/gpu/drm/msm/msm_debugfs.c | 2 +-
drivers/gpu/drm/msm/msm_fbdev.c | 2 +-
drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 -
drivers/gpu/drm/omapdrm/omap_debugfs.c | 2 +-
drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +-
drivers/gpu/drm/radeon/radeon_device.c | 2 +-
drivers/gpu/drm/radeon/radeon_fbdev.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 2 +-
drivers/gpu/drm/sitronix/st7571.c | 1 -
drivers/gpu/drm/tegra/fbdev.c | 2 +-
drivers/gpu/drm/vboxvideo/vbox_mode.c | 2 +-
include/drm/{drm_fb_helper.h => clients/drm_fbdev_helper.h} | 4 ++--
26 files changed, 27 insertions(+), 29 deletions(-)
rename drivers/gpu/drm/{drm_fb_helper.c => clients/drm_fbdev_helper.c} (99%)
rename include/drm/{drm_fb_helper.h => clients/drm_fbdev_helper.h} (99%)
diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst
index 400cd0112713..65bc16b96f8f 100644
--- a/Documentation/gpu/drm-kms-helpers.rst
+++ b/Documentation/gpu/drm-kms-helpers.rst
@@ -109,13 +109,13 @@ VBLANK Helper Reference
fbdev Helper Functions Reference
================================
-.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
+.. kernel-doc:: drivers/gpu/drm/clients/drm_fbdev_helper.c
:doc: fbdev helpers
-.. kernel-doc:: include/drm/drm_fb_helper.h
+.. kernel-doc:: include/drm/clients/drm_fbdev_helper.h
:internal:
-.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
+.. kernel-doc:: drivers/gpu/drm/clients/drm_fbdev_helper.c
:export:
Draw Helper Functions Reference
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index f0c340aa2ec6..3a0f2095de3c 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -158,7 +158,6 @@ drm_kms_helper-y := \
drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o
drm_kms_helper-$(CONFIG_DRM_PANIC_HELPER) += drm_panic_helper.o
drm_kms_helper-$(CONFIG_DRM_PANIC_SCREEN_QR_CODE) += drm_panic_helper_qr.o
-drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o
obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
#
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 59ea338b554c..126bfd9bb89e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -38,11 +38,11 @@
#include <linux/pci.h>
#include <linux/pm_runtime.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_edid.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_modeset_helper.h>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index f2f179421c4d..51a7a4091376 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -28,8 +28,8 @@
#include "amdgpu.h"
#include <drm/amdgpu_drm.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
#include "amdgpu_uvd.h"
#include "amdgpu_vce.h"
#include "atom.h"
diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
index 8bbae94804f8..f35afec2125f 100644
--- a/drivers/gpu/drm/armada/armada_fbdev.c
+++ b/drivers/gpu/drm/armada/armada_fbdev.c
@@ -9,9 +9,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_print.h>
diff --git a/drivers/gpu/drm/clients/Makefile b/drivers/gpu/drm/clients/Makefile
index c16addbc327f..1304ff358509 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
obj-$(CONFIG_DRM_CLIENT_LIB) += drm_client_lib.o
diff --git a/drivers/gpu/drm/clients/drm_fbdev_client.c b/drivers/gpu/drm/clients/drm_fbdev_client.c
index 7574bd36f45e..eec463d19943 100644
--- a/drivers/gpu/drm/clients/drm_fbdev_client.c
+++ b/drivers/gpu/drm/clients/drm_fbdev_client.c
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_client.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_print.h>
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/clients/drm_fbdev_helper.c
similarity index 99%
rename from drivers/gpu/drm/drm_fb_helper.c
rename to drivers/gpu/drm/clients/drm_fbdev_helper.c
index 76195410db60..fff3cf6a0aed 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/clients/drm_fbdev_helper.c
@@ -32,9 +32,9 @@
#include <linux/console.h>
#include <linux/export.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_atomic.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c
index 9412d9fdd74b..452f84400350 100644
--- a/drivers/gpu/drm/drm_fbdev_dma.c
+++ b/drivers/gpu/drm/drm_fbdev_dma.c
@@ -4,10 +4,10 @@
#include <linux/fb.h>
#include <linux/vmalloc.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fbdev_dma.h>
#include <drm/drm_fb_dma_helper.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_print.h>
diff --git a/drivers/gpu/drm/drm_fbdev_shmem.c b/drivers/gpu/drm/drm_fbdev_shmem.c
index 458c899b5d4f..8eb05fe9bc98 100644
--- a/drivers/gpu/drm/drm_fbdev_shmem.c
+++ b/drivers/gpu/drm/drm_fbdev_shmem.c
@@ -3,9 +3,9 @@
#include <linux/export.h>
#include <linux/fb.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fbdev_shmem.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_gem_shmem_helper.h>
diff --git a/drivers/gpu/drm/drm_fbdev_ttm.c b/drivers/gpu/drm/drm_fbdev_ttm.c
index 160bc35d8738..8eb59c2ac5ea 100644
--- a/drivers/gpu/drm/drm_fbdev_ttm.c
+++ b/drivers/gpu/drm/drm_fbdev_ttm.c
@@ -4,9 +4,9 @@
#include <linux/moduleparam.h>
#include <linux/vmalloc.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem.h>
#include <drm/drm_print.h>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 8641c9e84d4c..f412269d6323 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -10,9 +10,9 @@
#include <linux/fb.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_prime.h>
diff --git a/drivers/gpu/drm/gma500/fbdev.c b/drivers/gpu/drm/gma500/fbdev.c
index d1e93588234f..428912574f20 100644
--- a/drivers/gpu/drm/gma500/fbdev.c
+++ b/drivers/gpu/drm/gma500/fbdev.c
@@ -7,9 +7,9 @@
#include <linux/fb.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_framebuffer.h>
#include "gem.h"
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index db0e36dd8722..219ee17de3f6 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -38,10 +38,10 @@
#include <linux/vga_switcheroo.h>
#include <drm/clients/drm_client_setup.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/intel/display_parent_interface.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem.h>
#include <drm/drm_gem_framebuffer_helper.h>
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c
index f12701e286ec..d05307bfa123 100644
--- a/drivers/gpu/drm/msm/msm_debugfs.c
+++ b/drivers/gpu/drm/msm/msm_debugfs.c
@@ -9,8 +9,8 @@
#include <linux/debugfs.h>
#include <linux/fault-inject.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_debugfs.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_file.h>
#include <drm/drm_framebuffer.h>
diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index dd6d6c507d77..f37cc3f97a21 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -6,9 +6,9 @@
#include <linux/fb.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_crtc_helper.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_file.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index add19d479ebe..e91130f93db6 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -40,7 +40,6 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_eld.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fixed.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
diff --git a/drivers/gpu/drm/omapdrm/omap_debugfs.c b/drivers/gpu/drm/omapdrm/omap_debugfs.c
index 9edc1b3f9f95..1c40c489ed72 100644
--- a/drivers/gpu/drm/omapdrm/omap_debugfs.c
+++ b/drivers/gpu/drm/omapdrm/omap_debugfs.c
@@ -6,10 +6,10 @@
#include <linux/seq_file.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_debugfs.h>
#include <drm/drm_file.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_print.h>
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index 4881777642d2..e1dcc3cb7c55 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -7,9 +7,9 @@
#include <linux/fb.h>
#include <drm/clients/drm_client_setup.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_crtc_helper.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_file.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 9523240110a6..fdbdcefa84e7 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -33,11 +33,11 @@
#include <linux/vga_switcheroo.h>
#include <linux/vgaarb.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_cache.h>
#include <drm/drm_client_event.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_device.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_file.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_probe_helper.h>
diff --git a/drivers/gpu/drm/radeon/radeon_fbdev.c b/drivers/gpu/drm/radeon/radeon_fbdev.c
index 3e243f5e2f44..e40c23d9dff2 100644
--- a/drivers/gpu/drm/radeon/radeon_fbdev.c
+++ b/drivers/gpu/drm/radeon/radeon_fbdev.c
@@ -29,9 +29,9 @@
#include <linux/pm_runtime.h>
#include <linux/vga_switcheroo.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
index 9a1dc9f12072..b55113a7a00b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
@@ -8,9 +8,9 @@
#include <linux/iommu.h>
#include <linux/vmalloc.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm.h>
#include <drm/drm_dumb_buffers.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_gem.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_prime.h>
diff --git a/drivers/gpu/drm/sitronix/st7571.c b/drivers/gpu/drm/sitronix/st7571.c
index fc3ba5e8600f..5e60c4685671 100644
--- a/drivers/gpu/drm/sitronix/st7571.c
+++ b/drivers/gpu/drm/sitronix/st7571.c
@@ -20,7 +20,6 @@
#include <drm/drm_damage_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_encoder.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fbdev_shmem.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
diff --git a/drivers/gpu/drm/tegra/fbdev.c b/drivers/gpu/drm/tegra/fbdev.c
index 003e80cf7b9a..64c2e64f219b 100644
--- a/drivers/gpu/drm/tegra/fbdev.c
+++ b/drivers/gpu/drm/tegra/fbdev.c
@@ -11,9 +11,9 @@
#include <linux/fb.h>
#include <linux/vmalloc.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_crtc_helper.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
diff --git a/drivers/gpu/drm/vboxvideo/vbox_mode.c b/drivers/gpu/drm/vboxvideo/vbox_mode.c
index bb3f7f0ad7c4..7c34299fa531 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_mode.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c
@@ -13,11 +13,11 @@
#include <linux/iosys-map.h>
#include <linux/export.h>
+#include <drm/clients/drm_fbdev_helper.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_blend.h>
#include <drm/drm_edid.h>
-#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
diff --git a/include/drm/drm_fb_helper.h b/include/drm/clients/drm_fbdev_helper.h
similarity index 99%
rename from include/drm/drm_fb_helper.h
rename to include/drm/clients/drm_fbdev_helper.h
index 0c5e5ed7b5e7..7575aaf34c62 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/clients/drm_fbdev_helper.h
@@ -27,8 +27,8 @@
* Dave Airlie <airlied@linux.ie>
* Jesse Barnes <jesse.barnes@intel.com>
*/
-#ifndef DRM_FB_HELPER_H
-#define DRM_FB_HELPER_H
+#ifndef DRM_FBDEV_HELPER_H
+#define DRM_FBDEV_HELPER_H
struct drm_clip_rect;
struct drm_fb_helper;
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] drm/fbdev: Move fbdev helpers into client library
2026-09-24 9:29 ` [PATCH v2 2/2] drm/fbdev: Move fbdev helpers into client library Thomas Zimmermann
@ 2026-09-24 9:43 ` sashiko-bot
2026-09-24 10:46 ` Thomas Zimmermann
0 siblings, 1 reply; 5+ messages in thread
From: sashiko-bot @ 2026-09-24 9:43 UTC (permalink / raw)
To: Thomas Zimmermann; +Cc: dri-devel, intel-gfx, intel-xe
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 <tzimmermann@suse.de>
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?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260924093036.82356-1-tzimmermann@suse.de?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] drm/fbdev: Move fbdev helpers into client library
2026-09-24 9:43 ` sashiko-bot
@ 2026-09-24 10:46 ` Thomas Zimmermann
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2026-09-24 10:46 UTC (permalink / raw)
To: sashiko-reviews; +Cc: dri-devel, intel-gfx, intel-xe
Am 24.09.26 um 11:43 schrieb sashiko-bot@kernel.org:
> 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 <tzimmermann@suse.de>
>
> 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)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-24 10:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24 9:29 [PATCH v2 0/2] drm/fbdev: Move helpers to clients/ subdirectory Thomas Zimmermann
2026-09-24 9:29 ` [PATCH v2 1/2] drm/fbdev: Move fbdev module parameters next to module init Thomas Zimmermann
2026-09-24 9:29 ` [PATCH v2 2/2] drm/fbdev: Move fbdev helpers into client library Thomas Zimmermann
2026-09-24 9:43 ` sashiko-bot
2026-09-24 10:46 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox