[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250612122757.GI330732@ragnatech.se>
Date: Thu, 12 Jun 2025 14:27:57 +0200
From: Niklas Söderlund <niklas.soderlund+renesas@...natech.se>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>,
linux-media@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/4] media: rcar-csi2: Add D-PHY support for V4H
On 2025-06-12 13:19:45 +0200, Geert Uytterhoeven wrote:
> On Thu, 12 Jun 2025 at 12:01, Niklas Söderlund
> <niklas.soderlund+renesas@...natech.se> wrote:
> > On 2025-06-12 02:04:12 +0300, Laurent Pinchart wrote:
> > > > --- a/drivers/media/platform/renesas/rcar-csi2.c
> > > > +++ b/drivers/media/platform/renesas/rcar-csi2.c
> > > > + if (mbps >= 80) {
> > > > + if (mbps >= 2560)
> > > > + val = 6;
> > > > + else if (mbps >= 1280)
> > > > + val = 5;
> > > > + else if (mbps >= 640)
> > > > + val = 4;
> > > > + else if (mbps >= 320)
> > > > + val = 3;
> > > > + else if (mbps >= 160)
> > > > + val = 2;
> > > > + else if (mbps >= 80)
> > > > + val = 1;
> > >
> > > You could possibly replace this with
> > >
> > > val = ilog2(mbps / 80) + 1;
> > >
> > > Up to you.
> >
> > I opted to keep it as is to make it easier to match with the datasheet.
> > The ilog2() is clever but I will never remember why it was used ;-)
>
> +1 for ilog2() ;-)
When you two agree it's likely a good idea, I surrender ;-) Will use
ilog2() in next version. Thanks for your feedback.
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
Kind Regards,
Niklas Söderlund
Powered by blists - more mailing lists