2022-05-11 14:11:03

by Max Krummenacher

[permalink] [raw]
Subject: Re: [PATCH v2 3/4] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight

Hi Fabio

On Wed, May 11, 2022 at 2:07 PM Fabio Estevam <[email protected]> wrote:
>
> On Wed, May 11, 2022 at 8:59 AM Max Krummenacher <[email protected]> wrote:
>
> > backlight: backlight {
> > compatible = "pwm-backlight";
> > - brightness-levels = <0 127 191 223 239 247 251 255>;
> > - default-brightness-level = <1>;
> > + brightness-levels = <0 4 8 16 32 64 128 255>;
> > + default-brightness-level = <6>;
>
> In this patch, you are still changing the brightness levels + passing
> the polarity.
>
> I would suggest that this patch only touches the PWM polarity.

I disagree. Just setting the invert without at the same changing the
brightness-levels does
change the user experience way more than when one adapts the available
duty cycles
at the same time.

With the change to use the PWM with inverted polarity the PWM signals
is inverted to
how it was before this patch. Keeping the brightness-levels will then
have a big brightness
jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticable.

I.e. before the change the brightness for level [0..7] was
['off', 128/255, 64/255, 32/255, 16/255, 8/255, 4/255, 'off'],
if one only inverts the polarity it will be
['off', 128/255, 191/255, 223/255, 239/255, 247/255, 255/255].
With the proposed patch it will be
['off', 4/255, 8/255, 16/255, 32/255, 64/255, 128/255, 255/255].

Max

> The next patch could fix the brightness levels.


2022-05-11 23:19:57

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH v2 3/4] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight

On Wed, May 11, 2022 at 10:32 AM Max Krummenacher <[email protected]> wrote:

> I disagree. Just setting the invert without at the same changing the
> brightness-levels does
> change the user experience way more than when one adapts the available
> duty cycles
> at the same time.
>
> With the change to use the PWM with inverted polarity the PWM signals
> is inverted to
> how it was before this patch. Keeping the brightness-levels will then
> have a big brightness
> jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticable.
>
> I.e. before the change the brightness for level [0..7] was
> ['off', 128/255, 64/255, 32/255, 16/255, 8/255, 4/255, 'off'],
> if one only inverts the polarity it will be
> ['off', 128/255, 191/255, 223/255, 239/255, 247/255, 255/255].
> With the proposed patch it will be
> ['off', 4/255, 8/255, 16/255, 32/255, 64/255, 128/255, 255/255].

Ok, please add an explanation to the commit log as to why you are
changing the brightness levels
like you did here. Thanks