From: Hugo Villeneuve <hugo@hugovil.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: biju.das.au <biju.das.au@gmail.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>,
Philipp Zabel <p.zabel@pengutronix.de>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Chris Brandt <Chris.Brandt@renesas.com>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH 2/2] drm: renesas: rzg2l_mipi_dsi: Fix the power-on sequence
Date: Tue, 17 Mar 2026 12:12:32 -0400 [thread overview]
Message-ID: <20260317121232.39b1728e4d53d7243856a403@hugovil.com> (raw)
In-Reply-To: <TY3PR01MB1134627E19FCEA40819F8C6578641A@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Hi Biju,
On Tue, 17 Mar 2026 15:45:29 +0000
Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Hi Hugo,
>
> > -----Original Message-----
> > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Hugo Villeneuve
> > Sent: 17 March 2026 15:21
> > Subject: Re: [PATCH 2/2] drm: renesas: rzg2l_mipi_dsi: Fix the power-on sequence
> >
> > Hi Biju,
> >
> > On Tue, 17 Mar 2026 15:13:07 +0000
> > Biju Das <biju.das.jz@bp.renesas.com> wrote:
> >
> > > Hi Hugo,
> > >
> > > Thanks for the feedback.
> > >
> > > > -----Original Message-----
> > > > From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf
> > > > Of Hugo Villeneuve
> > > > Sent: 17 March 2026 15:01
> > > > Subject: Re: [PATCH 2/2] drm: renesas: rzg2l_mipi_dsi: Fix the
> > > > power-on sequence
> > > >
> > > > Hi Biju,
> > > >
> > > > On Tue, 17 Mar 2026 12:36:01 +0000
> > > > Biju <biju.das.au@gmail.com> wrote:
> > > >
> > > > > From: Biju Das <biju.das.jz@bp.renesas.com>
> > > > >
> > > > > Move reset_control_deassert() and reset_control_assert() from
> > > > > rzg2l_mipi_dsi_dphy_init()/rzg2l_mipi_dsi_dphy_exit() to
> > > > > atomic_pre_enable() and atomic_post_disable() respectively, and
> > > > > move
> > > > > rzg2l_mipi_dsi_set_display_timing() from atomic_pre_enable() to
> > > > > atomic_enable(), to align with the power-on sequence described in
> > > > > Figure 34.5 of section "34.4.2.1 Reset" of the RZ/G2L hardware
> > > > > manual
> > > > > Rev.1.50 May 2025.
> > > > >
> > > > > According to the hardware manual, LINK registers must be written
> > > > > before deasserting CMN_RSTB, and the 1ms delay is retained in
> > > > > atomic_pre_enable() after the deassert.
> > > > >
> > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > >
> > > > Seems to me like this should be backported to stable branches (missing Fixes / Cc: stable tags)?
> > >
> > > OK, will add fixes/stable tags.
> > >
> > > >
> > > >
> > > > > ---
> > > > > .../gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 27 +++++++++++--------
> > > > > 1 file changed, 16 insertions(+), 11 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 e53b48e4de56..9053ce037b75 100644
> > > > > --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> > > > > +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> > > > > @@ -484,7 +484,6 @@ static int rzg2l_mipi_dsi_dphy_init(struct rzg2l_mipi_dsi *dsi,
> > > > > u32 dphytim1;
> > > > > u32 dphytim2;
> > > > > u32 dphytim3;
> > > > > - int ret;
> > > > >
> > > > > /* All DSI global operation timings are set with recommended setting */
> > > > > for (i = 0; i < ARRAY_SIZE(rzg2l_mipi_dsi_global_timings); ++i)
> > > > > { @@
> > > > > -524,12 +523,6 @@ static int rzg2l_mipi_dsi_dphy_init(struct rzg2l_mipi_dsi *dsi,
> > > > > rzg2l_mipi_dsi_phy_write(dsi, DSIDPHYTIM2, dphytim2);
> > > > > rzg2l_mipi_dsi_phy_write(dsi, DSIDPHYTIM3, dphytim3);
> > > > >
> > > > > - ret = reset_control_deassert(dsi->rstc);
> > > > > - if (ret < 0)
> > > > > - return ret;
> > > > > -
> > > > > - fsleep(1000);
> > > > > -
> > > > > return 0;
> > > > > }
> > > > >
> > > > > @@ -541,8 +534,6 @@ static void rzg2l_mipi_dsi_dphy_exit(struct
> > > > > rzg2l_mipi_dsi *dsi)
> > > > >
> > > > > dphyctrl0 &= ~(DSIDPHYCTRL0_EN_LDO1200 | DSIDPHYCTRL0_EN_BGR);
> > > > > rzg2l_mipi_dsi_phy_write(dsi, DSIDPHYCTRL0, dphyctrl0);
> > > > > -
> > > > > - reset_control_assert(dsi->rstc);
> > > > > }
> > > > >
> > > > > static int rzg2l_dphy_conf_clks(struct rzg2l_mipi_dsi *dsi,
> > > > > unsigned long mode_freq, @@ -1030,24 +1021,37 @@ static void
> > > > > rzg2l_mipi_dsi_atomic_pre_enable(struct
> > > > drm_bridge *bridge,
> > > > > connector = drm_atomic_get_new_connector_for_encoder(state, bridge->encoder);
> > > > > crtc = drm_atomic_get_new_connector_state(state, connector)->crtc;
> > > > > mode = &drm_atomic_get_new_crtc_state(state,
> > > > > crtc)->adjusted_mode;
> > > > > -
> > > >
> > > > This is not related to your commit message (coding style change).
> > >
> > > Ack. Will restore it.
> > >
> > > >
> > > >
> > > > > ret = rzg2l_mipi_dsi_startup(dsi, mode);
> > > > > if (ret < 0)
> > > > > return;
> > > > >
> > > > > - rzg2l_mipi_dsi_set_display_timing(dsi, mode);
> > > > > + ret = reset_control_deassert(dsi->rstc);
> > > > > + if (ret < 0)
> > > > > + return;
> > > > > +
> > > > > + if (dsi->rstc)
> > > >
> > > > This seems new and not documented in the commit message? Is this a fix?
> > >
> > > RZ/V2H does not need this as it uses different IP. Previously fsleep()
> > > is in RZ/G2L specific function. I will update commit description for this change.
> >
> > Suggestion: maybe move this to a separate patch, to facilitate review/understanding...
>
> The only way is to introduce a new callback to handle it for RZ/G2L SoC.
> Then we won't be able to apply fixes tag as it is not fixing anything.
I am not sure what you mean by that callback? How a callback is needed
only if you split the patch?
In this original patch you test for the validity of dsi->rstc to
determine if you apply the delay or not. So in the case of RZ/V2H, I
understand that it is NULL?
> Currently this is optional reset, and it is no-op for RZ/V2H.
Does this means that the call to reset_control_deassert(dsi->rstc)
should not occur for RZ/V2H?
> What do you think?
>
> Patch #1) 1 us-> 1ms
> Patch #2) Introduce SoC specific callback to handle reset_deassert followed by delay
> Patch #3) Move the code as per this patch
>
> Or
>
> Patch #1) 1 us-> 1ms
> Patch #2) Use this patch as it is, with updated commit description
> So that fixes tag can be applied
>
> Cheers,
> Biju
>
--
Hugo Villeneuve <hugo@hugovil.com>
next prev parent reply other threads:[~2026-03-17 16:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 12:35 [PATCH 0/2] Improvements on RZ/G2L MIPI DSI driver Biju
2026-03-17 12:36 ` [PATCH 1/2] drm: renesas: rzg2l_mipi_dsi: Use fsleep() for 1ms delay in D-PHY init Biju
2026-03-17 14:47 ` Hugo Villeneuve
2026-03-17 15:01 ` Biju Das
2026-03-17 15:02 ` Hugo Villeneuve
2026-03-17 15:15 ` Biju Das
2026-03-17 12:36 ` [PATCH 2/2] drm: renesas: rzg2l_mipi_dsi: Fix the power-on sequence Biju
2026-03-17 15:01 ` Hugo Villeneuve
2026-03-17 15:13 ` Biju Das
2026-03-17 15:20 ` Hugo Villeneuve
2026-03-17 15:45 ` Biju Das
2026-03-17 16:12 ` Hugo Villeneuve [this message]
2026-03-17 16:36 ` Biju Das
2026-03-17 18:52 ` Hugo Villeneuve
2026-03-17 19:37 ` Biju Das
2026-03-17 19:49 ` Hugo Villeneuve
2026-03-17 20:10 ` Biju Das
2026-03-17 20:45 ` Biju Das
2026-03-17 20:54 ` Hugo Villeneuve
2026-03-17 16:04 ` Tommaso Merciai
2026-03-17 16:16 ` Biju Das
2026-03-17 16:36 ` Tommaso Merciai
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=20260317121232.39b1728e4d53d7243856a403@hugovil.com \
--to=hugo@hugovil.com \
--cc=Chris.Brandt@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=p.zabel@pengutronix.de \
--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®