From: sashiko-bot@kernel.org
To: "Damon Ding" <damon.ding@rock-chips.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v9 08/10] drm/bridge: analogix_dp: Rename and simplify is_rockchip()
Date: Wed, 27 May 2026 02:54:16 +0000 [thread overview]
Message-ID: <20260527025417.277AA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260527024336.191433-9-damon.ding@rock-chips.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The atomic_check callback modifies the global connector->display_info state, which violates the DRM atomic API contract. This problem wasn't introduced by this patch, but modifying persistent objects in atomic_check causes test-only commits to have side effects.
--
commit 644453a6e6cb6a36d4d9248a4a519cc2c40ae524
Author: Damon Ding <damon.ding@rock-chips.com>
drm/bridge: analogix_dp: Rename and simplify is_rockchip()
This commit renames the inline helper is_rockchip() to
analogix_dp_is_rockchip() to follow driver namespace conventions. It also
replaces chained equality comparisons with a switch-case layout for better
readability.
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 8cf6b73bceac0..116de3bd83a30 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -870,7 +870,7 @@ static int analogix_dp_bridge_atomic_check(struct drm_bridge *bridge,
> struct drm_display_info *di = &conn_state->connector->display_info;
> u32 mask = BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR444) | BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422);
>
> - if (is_rockchip(dp->plat_data->dev_type)) {
> + if (analogix_dp_is_rockchip(dp->plat_data->dev_type)) {
> if ((di->color_formats & mask)) {
> DRM_DEBUG_KMS("Swapping display color format from YUV to RGB\n");
> di->color_formats &= ~mask;
> di->color_formats |= BIT(DRM_OUTPUT_COLOR_FORMAT_RGB444);
> di->bpc = 8;
[Severity: High]
This isn't a bug introduced by this patch, but does modifying di->color_formats
and di->bpc violate the DRM atomic API contract?
The atomic_check callbacks can be executed for both real and test-only
commits. By modifying conn_state->connector->display_info directly, aren't we
altering the persistent connector state rather than the duplicated atomic
state?
This could cause test-only commits from userspace to incorrectly mutate global
state and potentially break subsequent real commits or format negotiations.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260527024336.191433-1-damon.ding@rock-chips.com?part=8
next prev parent reply other threads:[~2026-05-27 2:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 2:43 [PATCH v9 00/10] Add eDP support for RK3576 Damon Ding
2026-05-27 2:43 ` [PATCH v9 01/10] dt-bindings: display: rockchip: analogix-dp: Fix hclk as third clock for RK3588 Damon Ding
2026-05-27 2:43 ` [PATCH v9 02/10] dt-bindings: display: rockchip: analogix-dp: Add per-clock descriptions Damon Ding
2026-05-27 2:43 ` [PATCH v9 03/10] arm64: dts: rockchip: Add missing hclk for RK3588 eDP0 Damon Ding
2026-05-27 2:43 ` [PATCH v9 04/10] arm64: dts: rockchip: Add missing hclk for RK3588 eDP1 Damon Ding
2026-05-27 2:43 ` [PATCH v9 05/10] drm/rockchip: analogix_dp: Enable hclk for RK3588 Damon Ding
2026-05-27 3:11 ` sashiko-bot
2026-05-27 2:43 ` [PATCH v9 06/10] dt-bindings: display: rockchip: analogix-dp: Add support for RK3576 Damon Ding
2026-05-27 2:43 ` [PATCH v9 07/10] arm64: dts: rockchip: Add eDP node " Damon Ding
2026-05-27 2:43 ` [PATCH v9 08/10] drm/bridge: analogix_dp: Rename and simplify is_rockchip() Damon Ding
2026-05-27 2:54 ` sashiko-bot [this message]
2026-05-27 2:43 ` [PATCH v9 09/10] drm/bridge: analogix_dp: Add support for RK3576 Damon Ding
2026-05-27 2:43 ` [PATCH v9 10/10] drm/rockchip: " Damon Ding
2026-05-27 3:37 ` 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=20260527025417.277AA1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=damon.ding@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=robh@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