Hi Geert,

On Wed, May 28, 2025 at 1:32 PM Geert Uytterhoeven <ge...@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Wed, 28 May 2025 at 11:48, Lad, Prabhakar <prabhakar.cse...@gmail.com> 
> wrote:
> > On Fri, May 23, 2025 at 4:19 PM Geert Uytterhoeven <ge...@linux-m68k.org> 
> > wrote:
> > > On Mon, 12 May 2025 at 20:43, Prabhakar <prabhakar.cse...@gmail.com> 
> > > wrote:
> > > > From: Lad Prabhakar <prabhakar.mahadev-lad...@bp.renesas.com>
> > > >
> > > > Add DSI support for Renesas RZ/V2H(P) SoC.
> > > >
> > > > Co-developed-by: Fabrizio Castro <fabrizio.castro...@renesas.com>
> > > > Signed-off-by: Fabrizio Castro <fabrizio.castro...@renesas.com>
> > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad...@bp.renesas.com>
> > >
> > > Thanks for your patch!
> > >
> > > > --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> > > > +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
>
> > > > @@ -47,6 +52,11 @@ struct rzg2l_mipi_dsi_hw_info {
> > > >         u8 features;
> > > >  };
> > > >
> > > > +struct rzv2h_dsi_mode_calc {
> > > > +       unsigned long mode_freq;
> > > > +       u64 mode_freq_hz;
> > >
> > > Interesting... I guess mode_freq is not in Hz?
> > >
> > Actually it is int Hz, I will make it unsigned long.
>
> I really meant the first member.
> As rzv2h_dphy_mode_clk_check() does "mode_freq_hz = mode_freq * MILLI",
> mode_freq may be in kHz?
>
Sorry, I got confused. mode_freq is in kHz probably I'll rename this
to make it clear.

> > > > +};
>
> > > > @@ -308,6 +479,158 @@ static int rzg2l_dphy_conf_clks(struct 
> > > > rzg2l_mipi_dsi *dsi, unsigned long mode_f
> > > >         return 0;
> > > >  }
> > > >
> > > > +static unsigned int rzv2h_dphy_mode_clk_check(struct rzg2l_mipi_dsi 
> > > > *dsi,
> > > > +                                             unsigned long mode_freq)
> > > > +{
> > > > +       struct rzv2h_plldsi_parameters *dsi_parameters = 
> > > > &dsi->dsi_parameters;
> > > > +       u64 hsfreq_millihz, mode_freq_hz, mode_freq_millihz;
> > > > +       struct rzv2h_plldsi_parameters cpg_dsi_parameters;
> > > > +       unsigned int bpp, i;
> > > > +
> > > > +       bpp = mipi_dsi_pixel_format_to_bpp(dsi->format);
> > > > +
> > > > +       for (i = 0; i < 10; i += 1) {
> > > > +               unsigned long hsfreq;
> > > > +               bool parameters_found;
> > > > +
> > > > +               mode_freq_hz = mode_freq * MILLI + i;
> > >
> > > KILO?
> > >
> > OK, as mode_freq_hz is in Hz I'll make it unsigned long.
>
> I am not sure if "unsigned long" is OK. Is mode_freq in kHz?
> What is its largest value?
>
Sorry I got confused, I will reinstate mode_freq_hz to be u64. The
largest value can depend on the max resolution by the display.

Cheers,
Prabhakar

Reply via email to