Hi Prabhakar,

Thanks for the feedback.

> -----Original Message-----
> From: Lad, Prabhakar <[email protected]>
> 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 <[email protected]> wrote:
> >
> > From: Biju Das <[email protected]>
> >
> > 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 <[email protected]>
> > ---
> > 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);

Cheers,
Biju

> 
> Rest LGTM.
> 
> Cheers,
> Prabhakar
> 
> > +}
> > +
> >  static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)  {
> >         unsigned int num_data_lanes;
> > @@ -1454,6 +1477,10 @@ static int rzg2l_mipi_dsi_probe(struct
> > platform_device *pdev)
> >
> >         platform_set_drvdata(pdev, dsi);
> >
> > +       ret = rzg2l_mipi_dsi_pwrrdy_init(dsi);
> > +       if (ret)
> > +               return ret;
> > +
> >         pm_runtime_enable(dsi->dev);
> >
> >         ret = pm_runtime_resume_and_get(dsi->dev);
> > --
> > 2.43.0
> >
> >

Reply via email to