From: sashiko-bot@kernel.org
To: "Thierry Reding" <thierry.reding@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/tegra: Add blend mode properties
Date: Wed, 26 Aug 2026 11:07:49 +0000 [thread overview]
Message-ID: <20260826110750.326A41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260826105421.1825331-1-thierry.reding@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The newly added pixel_blend_mode property is not initialized in the plane's reset hook, leading to an invalid initial atomic state.
--
commit dea256106aa6a4944ed84de30a43b82c973ff72f
Author: Thierry Reding <treding@nvidia.com>
drm/tegra: Add blend mode properties
The default programming in the driver matches the "coverage" blend mode,
so add the corresponding pixel blend mode property to let userspace know
about it.
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index 0b3fcc7011b35..fefc3761a4bc7 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -939,6 +940,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm,
> }
>
> drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
> + drm_plane_create_blend_mode_property(&plane->base, blend_caps);
[Severity: High]
Since tegra_plane_reset() in drivers/gpu/drm/tegra/plane.c uses kzalloc_obj()
to zero-allocate the atomic plane state:
state = kzalloc_obj(*state);
if (state) {
plane->state = &state->base;
plane->state->plane = plane;
Will this cause atomic commits to fail with -EINVAL if userspace performs a
commit without changing the blend mode?
The pixel_blend_mode field is implicitly left at 0 (DRM_MODE_BLEND_PREMULTI).
Because only DRM_MODE_BLEND_COVERAGE (enum value 1) is exposed in blend_caps,
the core DRM enum validator (drm_property_change_valid_get()) will reject
the 0 value when userspace queries and subsequently commits the state.
Should tegra_plane_reset() be updated to explicitly initialize
pixel_blend_mode to DRM_MODE_BLEND_COVERAGE?
> drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260826105421.1825331-1-thierry.reding@kernel.org?part=1
next prev parent reply other threads:[~2026-08-26 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 10:54 [PATCH] drm/tegra: Add blend mode properties Thierry Reding
2026-08-26 11:07 ` sashiko-bot [this message]
2026-08-27 9:23 ` Jon Hunter
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=20260826110750.326A41F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=thierry.reding@kernel.org \
/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.