From: sashiko-bot@kernel.org
To: "Maxime Ripard" <mripard@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 03/60] drm/gem-atomic-helper: Convert simple-kms shadow helpers to create_plane_state
Date: Thu, 09 Jul 2026 12:03:22 +0000 [thread overview]
Message-ID: <20260709120322.C46F31F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260709-drm-no-more-plane-reset-v1-3-302d986fe5f0@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Unchecked dereference of optional `destroy_plane_state` function pointer in `drm_simple_kms_plane_reset()`.
--
--- Patch [3]: [PATCH 03/60] drm/gem-atomic-helper: Convert simple-kms shadow helpers to create_plane_state ---
commit 134f3a4eb906f19765fc34b15053dd50db1a56e3
Author: Maxime Ripard <mripard@kernel.org>
drm/gem-atomic-helper: Convert simple-kms shadow helpers to create_plane_state
drm_gem_simple_kms_reset_shadow_plane() implements the reset_plane
hook for simple-kms shadow-buffered planes. Since the reset hook
conflates initial state creation with hardware and software reset
during suspend/resume, convert it to the create_plane_state pattern.
Replace it with drm_gem_simple_kms_create_shadow_plane_state(), which
implements the create_plane_state hook using
drm_gem_create_shadow_plane_state(). Update
DRM_GEM_SIMPLE_DISPLAY_PIPE_SHADOW_PLANE_FUNCS accordingly.
> diff --git a/include/drm/drm_gem_atomic_helper.h b/include/drm/drm_gem_atomic_helper.h
> index 43657d8fb1c8c..8a3bb27233db0 100644
> --- a/include/drm/drm_gem_atomic_helper.h
> +++ b/include/drm/drm_gem_atomic_helper.h
[ ... ]
> @@ -150,7 +151,7 @@ void drm_gem_simple_kms_destroy_shadow_plane_state(struct drm_simple_display_pip
> #define DRM_GEM_SIMPLE_DISPLAY_PIPE_SHADOW_PLANE_FUNCS \
> .begin_fb_access = drm_gem_simple_kms_begin_shadow_fb_access, \
> .end_fb_access = drm_gem_simple_kms_end_shadow_fb_access, \
> - .reset_plane = drm_gem_simple_kms_reset_shadow_plane, \
> + .create_plane_state = drm_gem_simple_kms_create_shadow_plane_state, \
> .duplicate_plane_state = drm_gem_simple_kms_duplicate_shadow_plane_state, \
> .destroy_plane_state = drm_gem_simple_kms_destroy_shadow_plane_state
[Severity: High]
Does converting to the create_plane_state pattern expose a crash in
drm_simple_kms_plane_reset() if any drivers omit the destroy_plane_state
callback?
In drm_simple_kms_plane_reset(), if a driver provides the create_plane_state
hook but leaves the destroy_plane_state hook as NULL (relying on the default
fallback behavior), the reset path will dereference a NULL function pointer
when plane->state is not NULL:
drivers/gpu/drm/drm_simple_kms_helper.c:drm_simple_kms_plane_reset() {
if (pipe->funcs->create_plane_state) {
struct drm_plane_state *state;
if (plane->state) {
pipe->funcs->destroy_plane_state(pipe, plane->state);
plane->state = NULL;
}
...
}
drm_simple_kms_plane_destroy_state() natively supports an absent
destroy_plane_state callback by falling back to
drm_atomic_helper_plane_destroy_state(), so omitting this callback appears
to be a valid configuration that this newly introduced pattern might fail
to support.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709-drm-no-more-plane-reset-v1-0-302d986fe5f0@kernel.org?part=3
next prev parent reply other threads:[~2026-07-09 12:03 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260709-drm-no-more-plane-reset-v1-0-302d986fe5f0@kernel.org>
2026-07-09 11:50 ` [PATCH 01/60] drm/simple-kms: Add create_plane_state hook Maxime Ripard
2026-07-09 12:00 ` sashiko-bot
2026-07-09 13:49 ` Thomas Zimmermann
2026-07-09 11:50 ` [PATCH 02/60] drm/gem-atomic-helper: Create drm_gem_create_shadow_plane_state() Maxime Ripard
2026-07-09 11:50 ` [PATCH 03/60] drm/gem-atomic-helper: Convert simple-kms shadow helpers to create_plane_state Maxime Ripard
2026-07-09 12:03 ` sashiko-bot [this message]
2026-07-09 11:50 ` [PATCH 04/60] drm/gem-atomic-helper: Switch DRM_GEM_SHADOW_PLANE_FUNCS to atomic_create_state Maxime Ripard
2026-07-09 11:50 ` [PATCH 05/60] drm/gem-atomic-helper: Remove drm_gem_reset_shadow_plane() Maxime Ripard
2026-07-09 11:50 ` [PATCH 06/60] drm/sysfb: Convert to atomic_create_state Maxime Ripard
2026-07-09 11:50 ` [PATCH 07/60] drm/simple-kms: Switch " Maxime Ripard
2026-07-09 11:50 ` [PATCH 08/60] drm/ssd130x: Convert " Maxime Ripard
2026-07-09 11:50 ` [PATCH 09/60] drm/st7920: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 10/60] drm/appletbdrm: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 11/60] drm/vkms: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 12/60] drm/gem-atomic-helper: Remove __drm_gem_reset_shadow_plane() Maxime Ripard
2026-07-09 11:50 ` [PATCH 13/60] drm/amdgpu: Convert to atomic_create_state Maxime Ripard
2026-07-09 11:50 ` [PATCH 14/60] drm/hdlcd: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 15/60] drm/fsl-dcu: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 16/60] drm/hisilicon/kirin: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 17/60] drm/imx/dc: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 18/60] drm/imx/dcss: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 19/60] drm/ingenic: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 20/60] drm/kmb: " Maxime Ripard
2026-07-09 12:10 ` sashiko-bot
2026-07-09 11:50 ` [PATCH 21/60] drm/logicvc: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 22/60] drm/loongson: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 23/60] drm/meson: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 24/60] drm/msm/mdp4: " Maxime Ripard
2026-07-09 12:31 ` Dmitry Baryshkov
2026-07-09 11:50 ` [PATCH 25/60] drm/lcdif: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 26/60] drm/mxsfb: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 27/60] drm/qxl: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 28/60] drm/rockchip: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 29/60] drm/sprd: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 30/60] drm/sti: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 31/60] drm/stm: " Maxime Ripard
2026-07-09 11:50 ` [PATCH 32/60] drm/sun4i: sun8i: " Maxime Ripard
2026-07-09 12:24 ` sashiko-bot
2026-07-09 11:50 ` [PATCH 33/60] drm/tests: kunit: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 34/60] drm/tilcdc: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 35/60] drm/vboxvideo: " Maxime Ripard
2026-07-09 12:20 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 36/60] drm/virtio: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 37/60] drm/xlnx: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 38/60] drm/atomic-state-helper: Remove drm_atomic_helper_plane_reset() Maxime Ripard
2026-07-09 12:20 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 39/60] drm/amdgpu_dm: Convert to atomic_create_state Maxime Ripard
2026-07-09 12:23 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 40/60] drm/komeda: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 41/60] drm/malidp: " Maxime Ripard
2026-07-09 12:28 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 42/60] drm/armada: " Maxime Ripard
2026-07-09 12:23 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 43/60] drm/atmel-hlcdc: " Maxime Ripard
2026-07-09 12:29 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 44/60] drm/exynos: " Maxime Ripard
2026-07-09 12:25 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 45/60] drm/imx/ipuv3: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 46/60] drm/mediatek: " Maxime Ripard
2026-07-09 12:26 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 47/60] drm/msm/dpu1: " Maxime Ripard
2026-07-09 12:36 ` Dmitry Baryshkov
2026-07-09 11:51 ` [PATCH 48/60] drm/msm/mdp5: " Maxime Ripard
2026-07-09 12:46 ` Dmitry Baryshkov
2026-07-09 11:51 ` [PATCH 49/60] drm/nouveau: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 50/60] drm/omap: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 51/60] drm/rcar-du: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 52/60] drm/rz-du: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 53/60] drm/shmobile: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 54/60] drm/sun4i: layer: " Maxime Ripard
2026-07-09 12:33 ` sashiko-bot
2026-07-09 11:51 ` [PATCH 55/60] drm/vc4: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 56/60] drm/verisilicon: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 57/60] drm/vmwgfx: " Maxime Ripard
2026-07-09 11:51 ` [PATCH 58/60] drm/atomic-state-helper: Remove __drm_atomic_helper_plane_reset() Maxime Ripard
2026-07-09 11:51 ` [PATCH 59/60] drm/tegra: Convert to atomic_create_state Maxime Ripard
2026-07-09 11:51 ` [PATCH 60/60] drm/plane: Remove reset Maxime Ripard
2026-07-09 12:43 ` 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=20260709120322.C46F31F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=mripard@kernel.org \
--cc=sashiko-reviews@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