Linux-HyperV List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Thomas Zimmermann" <tzimmermann@suse.de>
Cc: dri-devel@lists.freedesktop.org, linux-hyperv@vger.kernel.org,
	intel-gfx@lists.freedesktop.org, imx@lists.linux.dev,
	virtualization@lists.linux.dev, Frank.Li@kernel.org,
	wsa+renesas@sang-engineering.com,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH 2/4] drm/pixel: Link format helpers into drm_pixel_helper.ko
Date: Mon, 19 Oct 2026 16:11:33 +0000	[thread overview]
Message-ID: <sashiko-outbox-177831@kernel.org> (raw)
In-Reply-To: <20261019154612.777074-3-tzimmermann@suse.de>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] drm: undefined drm_format_conv_state_*() references in drm_kms_helper
- [Low] drm/sitronix: missing DRM_PIXEL_HELPER select in config DRM_ST7920
--

commit 5297070737eb21b200d62be5b5e13861b6e29b57
Author: Thomas Zimmermann <tzimmermann@suse.de>

drm/pixel: Link format helpers into drm_pixel_helper.ko

This commit moves drm_format_helper.o from drm_kms_helper.ko into
drm_pixel_helper.ko and updates drivers using format helpers to select
DRM_PIXEL_HELPER and include <drm/drm_format_helper.h>.

> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index 5f555a2c1a4c8..fbc643747110f 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -100,6 +100,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_format_helper.o \
>  	drm_pixel_helper_common.o
>  obj-$(CONFIG_DRM_PIXEL_HELPER) += drm_pixel_helper.o
>  
> @@ -150,7 +151,6 @@ drm_kms_helper-y := \
>  	drm_crtc_helper.o \
>  	drm_damage_helper.o \
>  	drm_flip_work.o \
> -	drm_format_helper.o \
>  	drm_gem_atomic_helper.o \
>  	drm_gem_framebuffer_helper.o \
>  	drm_kms_helper_common.o \

[Severity: Low]
Will moving drm_format_helper.o to drm_pixel_helper-y while leaving
drm_gem_atomic_helper.o in drm_kms_helper-y cause undefined symbol references
when CONFIG_DRM_KMS_HELPER is enabled without CONFIG_DRM_PIXEL_HELPER (or when
CONFIG_DRM_KMS_HELPER=y and CONFIG_DRM_PIXEL_HELPER=m)?

In drivers/gpu/drm/drm_gem_atomic_helper.c, the shadow plane helpers call
functions defined in drivers/gpu/drm/drm_format_helper.c:

drivers/gpu/drm/drm_gem_atomic_helper.c:
__drm_gem_shadow_plane_state_init()
	__drm_atomic_helper_plane_state_init(&shadow_plane_state->base, plane);
	drm_format_conv_state_init(&shadow_plane_state->fmtcnv_state);

__drm_gem_duplicate_shadow_plane_state()
	drm_format_conv_state_copy(&new_shadow_plane_state->fmtcnv_state,
				   &shadow_plane_state->fmtcnv_state);

__drm_gem_destroy_shadow_plane_state()
	drm_format_conv_state_release(&shadow_plane_state->fmtcnv_state);
	__drm_atomic_helper_plane_destroy_state(&shadow_plane_state->base);

Because config DRM_KMS_HELPER in drivers/gpu/drm/Kconfig does not select
DRM_PIXEL_HELPER, linking drm_kms_helper fails with undefined references to
drm_format_conv_state_init(), drm_format_conv_state_copy(), and
drm_format_conv_state_release().

[ ... ]

> diff --git a/drivers/gpu/drm/sitronix/Kconfig b/drivers/gpu/drm/sitronix/Kconfig
> index 41a428ef8295e..c4b54f4f4f69a 100644
> --- a/drivers/gpu/drm/sitronix/Kconfig
> +++ b/drivers/gpu/drm/sitronix/Kconfig
> @@ -4,6 +4,7 @@ config DRM_ST7571
>  	select DRM_CLIENT_SELECTION
>  	select DRM_GEM_SHMEM_HELPER
>  	select DRM_KMS_HELPER
> +	select DRM_PIXEL_HELPER
>  	select VIDEOMODE_HELPERS
>  	help
>  	  Sitronix ST7571 is a driver and controller for 4-level gray
> @@ -46,6 +47,7 @@ config DRM_ST7586
>  	select DRM_KMS_HELPER
>  	select DRM_GEM_DMA_HELPER
>  	select DRM_MIPI_DBI
> +	select DRM_PIXEL_HELPER
>  	help
>  	  DRM driver for the following Sitronix ST7586 panels:
>  	  * LEGO MINDSTORMS EV3

[Severity: Low]
Should config DRM_ST7920 in drivers/gpu/drm/sitronix/Kconfig also select
DRM_PIXEL_HELPER (and include <drm/drm_format_helper.h> in
drivers/gpu/drm/sitronix/st7920.c)?

In drivers/gpu/drm/sitronix/st7920.c, the driver calls format helpers
directly:

st7920_fb_blit_rect()
	iosys_map_set_vaddr(&dst, buf);
	drm_fb_xrgb8888_to_mono(&dst, &dst_pitch, vmap, fb, rect, fmtcnv_state);

st7920_primary_plane_atomic_check()
	/* format conversion necessary; reserve buffer */
	buf = drm_format_conv_state_reserve(&shadow_plane_state->fmtcnv_state,
					    pitch, GFP_KERNEL);

Without selecting DRM_PIXEL_HELPER in DRM_ST7920, building st7920 when
CONFIG_DRM_PIXEL_HELPER is disabled (or when CONFIG_DRM_ST7920=y and
CONFIG_DRM_PIXEL_HELPER=m) fails with undefined references to
drm_fb_xrgb8888_to_mono() and drm_format_conv_state_reserve().

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261019154612.777074-1-tzimmermann@suse.de?part=2

  reply	other threads:[~2026-10-19 16:11 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 [this message]
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 ` [PATCH 4/4] drm/pixel: Link draw " Thomas Zimmermann
2026-10-19 16:32   ` 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=sashiko-outbox-177831@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eperezma@redhat.com \
    --cc=imx@lists.linux.dev \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /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