Re: [PATCH v2 9/9] drm/bridge: ti-sn65dsi86: Avoid invalid rates
From: Doug Anderson
Date: Wed Dec 18 2019 - 17:48:15 EST
Hi,
On Tue, Dec 17, 2019 at 8:03 PM Rob Clark <robdclark@xxxxxxxxx> wrote:
>
> > > + for (i = 0; i < ARRAY_SIZE(sink_rates); i++) {
> > > + rate_times_200khz = le16_to_cpu(sink_rates[i]);
> > > +
> > > + if (!rate_times_200khz)
> > > + break;
> > > +
> > > + switch (rate_times_200khz) {
> > > + case 27000:
> >
> > maybe a bit bike-sheddy, but I kinda prefer to use traditional normal
> > units, ie. just multiply the returned value by 200 and adjust the
> > switch case values. At least then they match the values in the lut
> > (other than khz vs mhz), which makes this whole logic a bit more
> > obvious... and at that point, maybe just loop over the lut table?
>
> (hit SEND too soon)
>
> and other than that, lgtm but haven't had a chance to test it yet
> (although I guess none of us have an eDP 1.4+ screen so maybe that is
> moot :-))
I think v3 should look much better to you. I also added a note to the
commit log indicating that the DP 1.4 patch was only tested via
hackery...
20191218143416.v3.9.Ib59207b66db377380d13748752d6fce5596462c5@changeid">https://lore.kernel.org/r/20191218143416.v3.9.Ib59207b66db377380d13748752d6fce5596462c5@changeid
-Doug