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 v7 08/10] drm/bridge: analogix_dp: Rename and simplify is_rockchip()
Date: Mon, 25 May 2026 08:34:42 +0000 [thread overview]
Message-ID: <20260525083442.74CE41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260525082033.117569-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 mutates the global connector->display_info structure instead of the proposed atomic state.
--
commit 5fc8c5d4b78e6b76c23cdd9ac4c790dbc7cd793d
Author: Damon Ding <damon.ding@rock-chips.com>
drm/bridge: analogix_dp: Rename and simplify is_rockchip()
This commit renames the helper is_rockchip() to analogix_dp_is_rockchip() to
align with the driver's namespace convention. It also refactors the internal
comparisons into a switch-case statement to improve readability and make future
additions easier.
> 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 is a pre-existing issue, but does mutating the global
connector->display_info structure inside an atomic_check callback violate the
atomic API contracts?
Since atomic_check is designed as a dry-run validation without side effects,
particularly for TEST_ONLY commits, modifying di->color_formats and di->bpc
permanently alters the connector's recorded physical capabilities. This strips
YUV support from the connector entirely upon the first atomic check, which
seems like it would lead to incorrect behavior for all subsequent commits.
Could format selection and fallbacks be tracked within the connector_state or
bridge_state instead of overwriting the global display_info?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260525082033.117569-1-damon.ding@rock-chips.com?part=8
next prev parent reply other threads:[~2026-05-25 8:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 8:20 [PATCH v7 00/10] Add eDP support for RK3576 Damon Ding
2026-05-25 8:20 ` [PATCH v7 01/10] dt-bindings: display: rockchip: analogix-dp: Fix hclk as third clock for RK3588 Damon Ding
2026-05-25 8:38 ` sashiko-bot
2026-05-25 9:42 ` Damon Ding
2026-05-25 11:43 ` Rob Herring (Arm)
2026-05-25 8:20 ` [PATCH v7 02/10] dt-bindings: display: rockchip: analogix-dp: Add per-clock descriptions Damon Ding
2026-05-25 11:13 ` Rob Herring (Arm)
2026-05-25 8:20 ` [PATCH v7 03/10] arm64: dts: rockchip: Add missing hclk for RK3588 eDP0 Damon Ding
2026-05-25 8:20 ` [PATCH v7 04/10] arm64: dts: rockchip: Add missing hclk for RK3588 eDP1 Damon Ding
2026-05-25 8:20 ` [PATCH v7 05/10] drm/rockchip: analogix_dp: Enable hclk for RK3588 Damon Ding
2026-05-25 8:48 ` sashiko-bot
2026-05-25 8:20 ` [PATCH v7 06/10] dt-bindings: display: rockchip: analogix-dp: Add support for RK3576 Damon Ding
2026-05-25 11:13 ` Rob Herring (Arm)
2026-05-25 8:20 ` [PATCH v7 07/10] arm64: dts: rockchip: Add eDP node " Damon Ding
2026-05-25 8:20 ` [PATCH v7 08/10] drm/bridge: analogix_dp: Rename and simplify is_rockchip() Damon Ding
2026-05-25 8:34 ` sashiko-bot [this message]
2026-05-25 8:20 ` [PATCH v7 09/10] drm/bridge: analogix_dp: Add support for RK3576 Damon Ding
2026-05-25 8:20 ` [PATCH v7 10/10] drm/rockchip: " Damon Ding
2026-05-25 8:51 ` 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=20260525083442.74CE41F000E9@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