Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, wsa+renesas@sang-engineering.com
Subject: Re: [PATCH v2 3/4] drm: renesas: rz-du: Move mode_valid logic to per-SoC clock limits
Date: Fri, 08 May 2026 20:38:46 +0000	[thread overview]
Message-ID: <20260508203847.8197FC2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260508111744.771659-4-prabhakar.mahadev-lad.rj@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Moving the pixel clock limits from an output-specific check to a global per-SoC limit drops the DPAD0 clock limit for RZ/G2L and prevents setting per-interface limits.
--

commit df71add63cd01bd86e697f0d293fcfc2d68de83e
Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

drm: renesas: rz-du: Move mode_valid logic to per-SoC clock limits

This commit shifts pixel clock validation from a hardcoded encoder output
check to per-SoC limits defined in rzg2l_du_device_info. It adds clock
bounds for RZ/G2UL and checks these limits against the display mode clock.

> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
> index 5e6dd16705e60..2fb79d11ab151 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
> @@ -50,8 +50,12 @@ rzg2l_du_encoder_mode_valid(struct drm_encoder *encoder,
>  			    const struct drm_display_mode *mode)
>  {
>  	struct rzg2l_du_encoder *renc = to_rzg2l_encoder(encoder);
> +	struct rzg2l_du_device *rcdu = to_rzg2l_du_device(renc->base.dev);
> +	const struct rzg2l_du_device_info *info = rcdu->info;
>  
> -	if (renc->output == RZG2L_DU_OUTPUT_DPAD0 && mode->clock > 83500)
> +	if (info->mode_clock_min && mode->clock < info->mode_clock_min)
> +		return MODE_CLOCK_LOW;
> +	if (info->mode_clock_max && mode->clock > info->mode_clock_max)
>  		return MODE_CLOCK_HIGH;

Does replacing the output-specific check with a global per-SoC limit
unintentionally drop the 83.5 MHz restriction for DPAD0 on SoCs with
multiple outputs?

Looking at rzg2l_du_r9a07g044_info in rzg2l_du_drv.c, the RZ/G2L SoC
supports both DSI0 and DPAD0 outputs, but no mode_clock_max is set for it
by this patch. This means DPAD0 on RZ/G2L loses its original 83.5 MHz
limit.

If a global mode_clock_max were added to the RZ/G2L info struct to restore
this limit, wouldn't it incorrectly throttle the DSI0 interface as well?

Should these limits be placed in struct rzg2l_du_output_routing instead
so that per-interface limits can still be enforced?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260508111744.771659-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=3

  reply	other threads:[~2026-05-08 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 11:17 [PATCH v2 0/4] Add DU support for RZ/T2H and RZ/N2H SoCs Prabhakar
2026-05-08 11:17 ` [PATCH v2 1/4] dt-bindings: display: renesas,rzg2l-du: Add RZ/T2H and RZ/N2H support Prabhakar
2026-05-08 20:22   ` sashiko-bot
2026-05-12 12:34     ` Lad, Prabhakar
2026-05-08 11:17 ` [PATCH v2 2/4] drm: renesas: rz-du: Make DU reset control optional for RZ/T2H support Prabhakar
2026-05-08 11:17 ` [PATCH v2 3/4] drm: renesas: rz-du: Move mode_valid logic to per-SoC clock limits Prabhakar
2026-05-08 20:38   ` sashiko-bot [this message]
2026-05-08 11:17 ` [PATCH v2 4/4] drm: renesas: rz-du: Add support for RZ/T2H SoC Prabhakar

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=20260508203847.8197FC2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko@lists.linux.dev \
    --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