mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Biju <biju.das.au@gmail.com>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v2 04/16] drm: renesas: rzg2l_mipi_dsi: Move global timings into hardware info struct
Date: Wed, 5 Aug 2026 17:29:28 +0200	[thread overview]
Message-ID: <anNW2IVJilS11XuE@tom-desktop> (raw)
In-Reply-To: <20260729125516.230757-5-biju.das.jz@bp.renesas.com>

Hi Biju,
Thanks for your patch.

On Wed, Jul 29, 2026 at 01:54:56PM +0100, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
> 
> Move rzg2l_mipi_dsi_global_timings and its array size out of the hardcoded
> ARRAY_SIZE reference in rzg2l_mipi_dsi_dphy_init() and into the struct
> rzg2l_mipi_dsi_hw_info. This allows future hardware variants to supply
> their own timing tables rather than sharing a single global array, making
> the driver more extensible without code duplication.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v1->v2:
>  * No change.
> ---
>  drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> index 1538eeece2b5..180384c10264 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> @@ -54,6 +54,8 @@ struct rzg2l_mipi_dsi_hw_info {
>  		const u8 *table;
>  		const u8 table_size;
>  	} cpg_plldsi;
> +	const struct rzg2l_mipi_dsi_timings *dsi_global_timings;
> +	unsigned int num_dsi_global_timings;
>  	u32 phy_reg_offset;
>  	u32 link_reg_offset;
>  	u32 dphyctrl0_init_val;
> @@ -488,8 +490,8 @@ static int rzg2l_mipi_dsi_dphy_init(struct rzg2l_mipi_dsi *dsi,
>  	u32 dphytim3;
>  
>  	/* All DSI global operation timings are set with recommended setting */
> -	for (i = 0; i < ARRAY_SIZE(rzg2l_mipi_dsi_global_timings); ++i) {
> -		dphy_timings = &rzg2l_mipi_dsi_global_timings[i];
> +	for (i = 0; i < dsi->info->num_dsi_global_timings; ++i) {
> +		dphy_timings = &dsi->info->dsi_global_timings[i];
>  		if (hsfreq <= dphy_timings->hsfreq_max)
>  			break;
>  	}
> @@ -1519,6 +1521,8 @@ static const struct rzg2l_mipi_dsi_hw_info rzv2h_mipi_dsi_info = {
>  	.cpg_plldsi.limits = rzv2h_plldsi_limits,
>  	.cpg_plldsi.table = rzv2h_cpg_div_table,
>  	.cpg_plldsi.table_size = ARRAY_SIZE(rzv2h_cpg_div_table),

> +	.dsi_global_timings = rzg2l_mipi_dsi_global_timings,
> +	.num_dsi_global_timings = ARRAY_SIZE(rzg2l_mipi_dsi_global_timings),

Are we sure that rzv2h use these new entries:

	.dsi_global_timings  = rzg2l_mipi_dsi_global_timings,
	.num_dsi_global_timings = ARRAY_SIZE(rzg2l_mipi_dsi_global_timings),

?

Kind regards,
Tommaso

>  	.phy_reg_offset = 0x10000,
>  	.link_reg_offset = 0,
>  	.min_dclk = 5440,
> @@ -1530,6 +1534,8 @@ static const struct rzg2l_mipi_dsi_hw_info rzg2l_mipi_dsi_info = {
>  	.dphy_init = rzg2l_mipi_dsi_dphy_init,
>  	.dphy_exit = rzg2l_mipi_dsi_dphy_exit,
>  	.dphy_conf_clks = rzg2l_dphy_conf_clks,
> +	.dsi_global_timings = rzg2l_mipi_dsi_global_timings,
> +	.num_dsi_global_timings = ARRAY_SIZE(rzg2l_mipi_dsi_global_timings),
>  	.link_reg_offset = 0x10000,
>  	.dphyctrl0_init_val = DSIDPHYCTRL0_CAL_EN_HSRX_OFS | DSIDPHYCTRL0_CMN_MASTER_EN |
>  			      DSIDPHYCTRL0_RE_VDD_DETVCCQLV18 | DSIDPHYCTRL0_EN_BGR,
> -- 
> 2.43.0
> 

  reply	other threads:[~2026-08-05 15:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 12:54 [PATCH v2 00/16] Add support for DU, LVDS and DSI on the Renesas RZ/G3L SoC Biju
2026-07-29 12:54 ` [PATCH v2 01/16] dt-bindings: display: bridge: renesas,dsi: Document RZ/G3L Biju
2026-08-03  8:34   ` Krzysztof Kozlowski
2026-08-03  8:36     ` Biju Das
2026-08-05 13:17   ` Biju Das
2026-07-29 12:54 ` [PATCH v2 02/16] drm: renesas: rzg2l_mipi_dsi: Add dphyctrl0_init_val to hw_info Biju
2026-08-05 15:00   ` Tommaso Merciai
2026-07-29 12:54 ` [PATCH v2 03/16] drm: renesas: rzg2l_mipi_dsi: Add activation_dly " Biju
2026-08-05 15:02   ` Tommaso Merciai
2026-07-29 12:54 ` [PATCH v2 04/16] drm: renesas: rzg2l_mipi_dsi: Move global timings into hardware info struct Biju
2026-08-05 15:29   ` Tommaso Merciai [this message]
2026-08-05 16:31     ` Biju Das
2026-07-29 12:54 ` [PATCH v2 05/16] drm: renesas: rzg2l_mipi_dsi: Add support for DSI PWRRDY Biju
2026-07-29 12:54 ` [PATCH v2 06/16] drm: renesas: rzg2l_mipi_dsi: Add RZ/G3L MIPI DSI support Biju
2026-07-29 12:54 ` [PATCH v2 07/16] dt-bindings: display: renesas,rzg2l-du: Document RZ/G3L SoC Biju
2026-08-03  8:34   ` Krzysztof Kozlowski
2026-08-05 13:18   ` Biju Das
2026-07-29 12:55 ` [PATCH v2 08/16] drm: renesas: rz-du: Add RZ/G3L (R9A08G046) DU support Biju
2026-08-05 14:55   ` Tommaso Merciai
2026-08-05 16:19     ` Biju Das
2026-07-29 12:55 ` [PATCH v2 09/16] dt-bindings: display: bridge: Document Renesas RZ/G3L LVDS encoder Biju
2026-08-05 13:19   ` Biju Das
2026-07-29 12:55 ` [PATCH v2 10/16] drm: renesas: rz-du: Add support for " Biju
2026-07-29 12:55 ` [PATCH v2 11/16] arm64: dts: renesas: r9a08g046: Add fcpvd node Biju
2026-08-05 16:12   ` Tommaso Merciai
2026-07-29 12:55 ` [PATCH v2 12/16] arm64: dts: renesas: r9a08g046: Add vspd node Biju
2026-08-05 16:14   ` Tommaso Merciai
2026-07-29 12:55 ` [PATCH v2 13/16] arm64: dts: renesas: r9a08g046: Add DU and DSI nodes Biju
2026-07-29 12:55 ` [PATCH v2 14/16] arm64: dts: renesas: r9a08g046: Add LVDS node Biju
2026-07-29 12:55 ` [PATCH v2 15/16] arm64: dts: renesas: Add DSI overlay for RZ/G3L SMARC EVK with ADV7535 Biju
2026-07-29 12:55 ` [PATCH v2 16/16] arm64: dts: renesas: Add LVDS overlay for RZ/G3L SMARC EVK with ITE6263 Biju

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=anNW2IVJilS11XuE@tom-desktop \
    --to=tommaso.merciai.xr@bp.renesas.com \
    --cc=airlied@gmail.com \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®