From: Thomas Zimmermann <tzimmermann@suse.de>
To: jfalempe@redhat.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, airlied@gmail.com, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-hyperv@vger.kernel.org, intel-gfx@lists.freedesktop.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
nouveau@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org,
virtualization@lists.linux.dev, sashiko-reviews@lists.linux.dev,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 4/4] drm/pixel: Link draw helpers into drm_pixel_helper.ko
Date: Mon, 19 Oct 2026 17:32:45 +0200 [thread overview]
Message-ID: <20261019154612.777074-5-tzimmermann@suse.de> (raw)
In-Reply-To: <20261019154612.777074-1-tzimmermann@suse.de>
Move drm_draw.o from the DRM core to drm_pixel_helper.ko. Remove the
Kconfig option DRM_DRAW and provide the draw helpers unconditionally.
Having draw code in the DRM core is a left-over fro when panic handling
was entirely located in the DRM core as well. With all the panic drawing
in drm_pixel_helper.ko, the drawing helpers can go there as well. DRM's
log clients also uses the drawing helpers for output. Update the Kconfig
rules to select DRM_PIXEL_HELPER instead of DRM_DRAW for this client.
The format and the draw helpers share the per-pixel color-format code
from drm_format_internal. Putting it all into one place will hopefully
help with sharing more code in the future.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/Kconfig | 5 -----
drivers/gpu/drm/Makefile | 2 +-
drivers/gpu/drm/clients/Kconfig | 2 +-
drivers/gpu/drm/{drm_draw.c => drm_draw_helper.c} | 0
4 files changed, 2 insertions(+), 7 deletions(-)
rename drivers/gpu/drm/{drm_draw.c => drm_draw_helper.c} (100%)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index bf7c59944340..1b16e6101a53 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -52,15 +52,10 @@ config DRM_KMS_HELPER
config DRM_PIXEL_HELPER
tristate
depends on DRM
- select DRM_DRAW if DRM_PANIC
select FONT_SUPPORT if DRM_PANIC
help
Helpers for working with pixel data in DRM.
-config DRM_DRAW
- bool
- depends on DRM
-
config DRM_PANIC
bool "Display a user-friendly message when a kernel panic occurs"
depends on DRM && PRINTK
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 18a5a5baf029..ab9eb4c21264 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -91,7 +91,6 @@ drm-$(CONFIG_DRM_PRIVACY_SCREEN) += \
drm_privacy_screen_x86.o
drm-$(CONFIG_DRM_ACCEL) += ../../accel/drm_accel.o
drm-$(CONFIG_DRM_PANIC) += drm_panic.o
-drm-$(CONFIG_DRM_DRAW) += drm_draw.o
drm-$(CONFIG_DRM_RAS) += drm_ras.o drm_ras_nl.o drm_ras_genl_family.o
obj-$(CONFIG_DRM) += drm.o
@@ -100,6 +99,7 @@ obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o
obj-$(CONFIG_DRM_PANEL_BACKLIGHT_QUIRKS) += drm_panel_backlight_quirks.o
drm_pixel_helper-y := \
+ drm_draw_helper.o \
drm_format_helper.o \
drm_pixel_helper_common.o
drm_pixel_helper-$(CONFIG_DRM_PANIC) += drm_panic_helper.o
diff --git a/drivers/gpu/drm/clients/Kconfig b/drivers/gpu/drm/clients/Kconfig
index 6096c623d9d5..8d21edc4cc5b 100644
--- a/drivers/gpu/drm/clients/Kconfig
+++ b/drivers/gpu/drm/clients/Kconfig
@@ -3,6 +3,7 @@
config DRM_CLIENT_LIB
tristate
depends on DRM
+ select DRM_PIXEL_HELPER if DRM_CLIENT_LOG
select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
select FB_CORE if DRM_FBDEV_EMULATION
help
@@ -76,7 +77,6 @@ config DRM_CLIENT_LOG
depends on DRM_CLIENT_SELECTION
select DRM_CLIENT
select DRM_CLIENT_SETUP
- select DRM_DRAW
select FONT_SUPPORT
help
This enable a drm logger, that will print the kernel messages to the
diff --git a/drivers/gpu/drm/drm_draw.c b/drivers/gpu/drm/drm_draw_helper.c
similarity index 100%
rename from drivers/gpu/drm/drm_draw.c
rename to drivers/gpu/drm/drm_draw_helper.c
--
2.56.0
next prev parent reply other threads:[~2026-10-19 15:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 15:32 [PATCH 0/4] drm: Move drawing to pixel-helper module Thomas Zimmermann
2026-10-19 15:32 ` [PATCH 1/4] drm: Add helper module for working with pixel data Thomas Zimmermann
2026-10-19 15:32 ` [PATCH 2/4] drm/pixel: Link format helpers into drm_pixel_helper.ko Thomas Zimmermann
2026-10-19 16:11 ` sashiko-bot
2026-10-19 15:32 ` [PATCH 3/4] drm/pixel: Link panic " Thomas Zimmermann
2026-10-19 16:19 ` sashiko-bot
2026-10-19 16:32 ` Thomas Zimmermann
2026-10-19 15:32 ` Thomas Zimmermann [this message]
2026-10-19 16:32 ` [PATCH 4/4] drm/pixel: Link draw " sashiko-bot
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=20261019154612.777074-5-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=imx@lists.linux.dev \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jfalempe@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=simona@ffwll.ch \
--cc=virtualization@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox