Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tommaso Merciai" <tommaso.merciai.xr@bp.renesas.com>
Cc: wsa+renesas@sang-engineering.com, conor+dt@kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org,
	dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v6 15/21] drm: renesas: rz-du: Add RZ/G3E support
Date: Thu, 13 Aug 2026 23:47:00 +0000	[thread overview]
Message-ID: <20260813234701.186AD1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <11313371ef0b31cb5f014e171ba0d9868eb0710d.1775636898.git.tommaso.merciai.xr@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Strict equality check for `rstate->outputs` fails for dual-link or cloned configurations, causing incorrect clock duty cycle.
--

--- Patch [15]: [PATCH v6 15/21] drm: renesas: rz-du: Add RZ/G3E support ---
commit 93ac2aa593af29d345db6eb285c2df970c9009bd
Author: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>

drm: renesas: rz-du: Add RZ/G3E support

This commit adds support for the RZ/G3E SoC to the RZ/G2L DU driver. It
introduces the RZG2L_DU_FEATURE_SMUX2_DSI_CLK feature flag to set the correct
clock duty cycle based on the selected output (LVDS vs DSI/RGB).

> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
[ ... ]
> @@ -64,11 +64,32 @@
>  static void rzg2l_du_crtc_set_display_timing(struct rzg2l_du_crtc *rcrtc)
>  {
[ ... ]
> +	if (rzg2l_du_has(rcdu, RZG2L_DU_FEATURE_SMUX2_DSI_CLK)) {
> +		struct clk *clk_parent;
> +
> +		clk_parent = clk_get_parent(rcrtc->rzg2l_clocks.dclk);
> +
> +		/*
> +		 * Request appropriate duty cycle to let clock driver select
> +		 * the correct parent:
> +		 * - CDIV7_DSIx_CLK (LVDS path) has DUTY H/L=4/3, 4/7 duty cycle.
> +		 * - CSDIV_2to16_PLLDSIx (DSI/RGB path) has symmetric 50% duty cycle.
> +		 */
> +		if (rstate->outputs == BIT(RZG2L_DU_OUTPUT_LVDS0) ||
> +		    rstate->outputs == BIT(RZG2L_DU_OUTPUT_LVDS1))

[Severity: High]
Will this strict equality check fail for dual-link LVDS configurations?

If a dual-channel LVDS panel is configured, the DRM encoder mask may contain
two encoders to drive both links. In that case, rzg2l_du_crtc_atomic_check()
would accumulate both bits, meaning rstate->outputs would have both LVDS0
and LVDS1 bits set.

Because this relies on strict equality rather than a bitwise mask check, does
this condition evaluate to false and incorrectly fall back to the 50% duty
cycle intended for DSI/RGB paths?

> +			clk_set_duty_cycle(clk_parent, 4, 7);
> +		else
> +			clk_set_duty_cycle(clk_parent, 1, 2);
> +	}
> +
>  	clk_set_rate(rcrtc->rzg2l_clocks.dclk, mode_clock);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1775636898.git.tommaso.merciai.xr@bp.renesas.com?part=15

  reply	other threads:[~2026-08-13 23:47 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 10:36 [PATCH v6 00/21] Add support for DU and DSI on the Renesas RZ/G3E SoC Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 01/21] clk: renesas: rzv2h: Add PLLDSI clk mux support Tommaso Merciai
2026-04-08 13:19   ` Geert Uytterhoeven
2026-04-08 10:36 ` [PATCH v6 02/21] clk: renesas: r9a09g047: Add CLK_PLLETH_LPCLK support Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 03/21] clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1} clocks Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 04/21] clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_DIV7 clocks Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 05/21] clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1}_CSDIV clocks Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 06/21] clk: renesas: r9a09g047: Add support for SMUX2_DSI{0,1}_CLK Tommaso Merciai
2026-04-08 13:23   ` Geert Uytterhoeven
2026-04-08 10:36 ` [PATCH v6 07/21] clk: renesas: r9a09g047: Add support for DSI clocks and resets Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 08/21] clk: renesas: r9a09g047: Add support for LCDC{0,1} " Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 09/21] dt-bindings: display: renesas,rzg2l-du: Refuse port@1 for RZ/G2UL Tommaso Merciai
2026-04-08 12:21   ` Laurent Pinchart
2026-04-09  6:21   ` Krzysztof Kozlowski
2026-04-08 10:36 ` [PATCH v6 10/21] dt-bindings: display: renesas,rzg2l-du: Add support for RZ/G3E SoC Tommaso Merciai
2026-04-08 12:24   ` Laurent Pinchart
2026-04-08 14:02     ` Tommaso Merciai
2026-04-08 14:16       ` Laurent Pinchart
2026-04-08 14:44         ` Tommaso Merciai
2026-04-08 15:00           ` Laurent Pinchart
2026-04-09 11:15             ` Tommaso Merciai
2026-04-09 13:24               ` Laurent Pinchart
2026-04-10 13:21                 ` Tommaso Merciai
2026-04-16 16:34                   ` Laurent Pinchart
2026-04-08 10:36 ` [PATCH v6 11/21] dt-bindings: display: bridge: renesas,dsi: " Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 12/21] drm: renesas: rz-du: mipi_dsi: Add out_port to OF data Tommaso Merciai
2026-04-08 12:30   ` Laurent Pinchart
2026-04-08 10:36 ` [PATCH v6 13/21] drm: renesas: rz-du: mipi_dsi: Add RZ_MIPI_DSI_FEATURE_GPO0R feature Tommaso Merciai
2026-04-08 12:31   ` Laurent Pinchart
2026-04-08 14:12     ` Tommaso Merciai
2026-04-08 14:17       ` Laurent Pinchart
2026-04-08 14:58         ` Tommaso Merciai
2026-04-08 15:08           ` Laurent Pinchart
2026-04-09 11:14             ` Tommaso Merciai
2026-04-09 13:22               ` Laurent Pinchart
2026-04-08 10:36 ` [PATCH v6 14/21] drm: renesas: rz-du: mipi_dsi: Add support for RZ/G3E Tommaso Merciai
2026-04-08 10:37 ` [PATCH v6 15/21] drm: renesas: rz-du: Add RZ/G3E support Tommaso Merciai
2026-08-13 23:47   ` sashiko-bot [this message]
2026-04-08 10:37 ` [PATCH v6 16/21] media: dt-bindings: media: renesas,vsp1: Document RZ/G3E Tommaso Merciai
2026-04-08 10:52   ` Laurent Pinchart
2026-04-08 10:37 ` [PATCH v6 17/21] media: dt-bindings: media: renesas,fcp: Document RZ/G3E SoC Tommaso Merciai
2026-04-08 10:53   ` Laurent Pinchart
2026-04-08 10:37 ` [PATCH v6 18/21] arm64: dts: renesas: r9a09g047: Add fcpvd{0,1} nodes Tommaso Merciai
2026-04-08 11:32   ` Laurent Pinchart
2026-05-29 11:45     ` Geert Uytterhoeven
2026-04-08 10:37 ` [PATCH v6 19/21] arm64: dts: renesas: r9a09g047: Add vspd{0,1} nodes Tommaso Merciai
2026-04-08 11:33   ` Laurent Pinchart
2026-05-29 12:05     ` Geert Uytterhoeven
2026-04-08 10:37 ` [PATCH v6 20/21] arm64: dts: renesas: r9a09g047: Add DU{0,1} and DSI nodes Tommaso Merciai
2026-04-08 12:11   ` Laurent Pinchart
2026-04-08 10:37 ` [PATCH v6 21/21] arm64: dts: renesas: r9a09g047e57-smarc: Enable DU0 and DSI support Tommaso Merciai
2026-04-08 13:01   ` Geert Uytterhoeven
2026-05-04 12:41 ` [PATCH v6 00/21] Add support for DU and DSI on the Renesas RZ/G3E SoC Geert Uytterhoeven

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=20260813234701.186AD1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tommaso.merciai.xr@bp.renesas.com \
    --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