Re: [PATCH v4 4/9] drm: renesas: rzg2l_mipi_dsi: Add support for DSI PWRRDY

From: Lad, Prabhakar

Date: Thu Oct 01 2026 - 04:43:59 EST


Hi Biju,

On Thu, Oct 1, 2026 at 9:15 AM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
>
> Hi Prabhakar,
>
> Thanks for the feedback.
>
> > -----Original Message-----
> > From: Lad, Prabhakar <prabhakar.csengg@xxxxxxxxx>
> > Sent: 01 October 2026 09:07
> > Subject: Re: [PATCH v4 4/9] drm: renesas: rzg2l_mipi_dsi: Add support for DSI PWRRDY
> >
> > Hi Biju,
> >
> > Thank you for the patch.
> >
> > On Wed, Sep 30, 2026 at 3:47 PM Biju <biju.das.au@xxxxxxxxx> wrote:
> > >
> > > From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> > >
> > > The register for controlling power to the DSI region is in the SYSC
> > > (System Controller) block. Add support for controlling the DSI PWRRDY
> > > signal so the driver can efficiently manage power to the DSI region.
> > >
> > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> > > ---
> > > v3->v4:
> > > * Dropped pwrrdy variable from struct rzg2l_mipi_dsi_hw_info and instead
> > > using feature flag RZ_MIPI_DSI_FEATURE_PWRRDY
> > > * Dropped rzg2l_mipi_dsi_pwrrdy_off() as it is taken care by
> > > devm_pwrseq_get().
> > > v2->v3:
> > > * Updated powerseq API names.
> > > v1->v2:
> > > * Switched to power sequence for handling pwrrdy signal.
> > > * Dropped header file regmap.h and mfd/syscon.h
> > > * Added header file pwrseq/consumer.h
> > > ---
> > > .../gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 27 +++++++++++++++++++
> > > 1 file changed, 27 insertions(+)
> > >
> > > 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 d67e1230b70c..5263b2b8f1ca 100644
> > > --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> > > +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> > > @@ -18,6 +18,7 @@
> > > #include <linux/of_graph.h>
> > > #include <linux/platform_device.h>
> > > #include <linux/pm_runtime.h>
> > > +#include <linux/pwrseq/consumer.h>
> > > #include <linux/reset.h>
> > > #include <linux/slab.h>
> > > #include <linux/units.h>
> > > @@ -38,6 +39,7 @@ MODULE_IMPORT_NS("RZV2H_CPG");
> > > #define RZG2L_DCS_BUF_SIZE 128 /* Maximum DCS buffer size in external memory. */
> > >
> > > #define RZ_MIPI_DSI_FEATURE_16BPP BIT(0)
> > > +#define RZ_MIPI_DSI_FEATURE_PWRRDY BIT(1)
> > >
> > > struct rzg2l_mipi_dsi;
> > >
> > > @@ -87,6 +89,8 @@ struct rzg2l_mipi_dsi {
> > > struct clk *vclk;
> > > struct clk *lpclk;
> > >
> > > + struct pwrseq_desc *pwrseq;
> > > +
> > > enum mipi_dsi_pixel_format format;
> > > unsigned int num_data_lanes;
> > > unsigned int lanes;
> > > @@ -1396,6 +1400,25 @@ static const struct dev_pm_ops rzg2l_mipi_pm_ops = {
> > > * Probe & Remove
> > > */
> > >
> > > +static int rzg2l_mipi_dsi_pwrrdy_init(struct rzg2l_mipi_dsi *dsi) {
> > > + if (!(dsi->info->features & RZ_MIPI_DSI_FEATURE_PWRRDY))
> > > + return 0;
> > > +
> > > + dsi->pwrseq = devm_pwrseq_get(dsi->dev, "dsi-pwrrdy");
> > > + if (IS_ERR(dsi->pwrseq)) {
> > > + /*
> > > + * This platform requires a sequencer. If we can't get it, we
> > > + * must return the error (including -EPROBE_DEFER to wait for
> > > + * the provider to appear)
> > > + */
> > > + return dev_err_probe(dsi->dev, PTR_ERR(dsi->pwrseq),
> > > + "Failed to get required power sequencer\n");
> > > + }
> > > +
> > > + return pwrseq_enable(dsi->pwrseq);
> > Do we want to add a devm action to disable the pwrseq when the DSI driver is removed?
>
> It is taken care by devm_pwrseq_put() the release handler
> that calls pwrseq_disable().
>
> if (desc->powered_on)
> pwrseq_disable(desc);
>
Ahh perfect!

Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>

Cheers,
Prabhakar