Re: Re : Re: Commit 76c2ff3e broke backlight on Chromebook snow

2021-11-03 Thread Simon Glass
Hi,

On Sat, 23 Oct 2021 at 03:23, Dario Binacchi  wrote:
>
> Hi Guillaume,
>
> > Il 22/10/2021 14:34 Guillaume GARDET  ha scritto:
> >
> >
> > Hi Dario,
> >
> > - Dario Binacchi  a écrit :
> > > Hi Guillaume,
> > >
> > > > Il 21/10/2021 16:47 Guillaume GARDET  ha 
> > > > scritto:
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Commit 76c2ff3e [0] broke backlight on Chromebook snow.
> > > > A revert on top of 2021.10 restores the backlight.
> > > > Not sure why it breaks on Chromebook snow yet. Dario, any idea how to 
> > > > fix this?
> > >
> > > Is it possible that max_level is equal to min_level and therefore division
> > > by zero is done?
> >
> > I do not think so, because u-boot does not crash and the DTS file has 
> > multiple levels:
> > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/exynos5250-snow.dts#L243
> >
> > I think the problem occurs when 'cur_level == max_level', which is also the 
> > default value in the DTS.
> > If I change the default-brightness-level to 6 (instead of 7), then the 
> > backlight works again, which would confirm the assumption above.
>
> I have set the default-brightness-level to max-level on my beaglebone board 
> but the backlight works the same.
> I didn't see any difference.

I got this running in my lab now and sent a possible fix.

Regards,
Simon

>
> Thanks and regards
> Dario
>
> > pwm_backlight_set_brightness seems to set cur_level to max value by 
> > default. Maybe the driver thinks there is nothing to do, since current 
> > level is also the desired level?
[..]


Re: Commit 76c2ff3e broke backlight on Chromebook snow

2021-11-03 Thread Simon Glass
Hi,

On Fri, 22 Oct 2021 at 05:38, Dario Binacchi  wrote:
>
> Hi Guillaume,
>
> > Il 21/10/2021 16:47 Guillaume GARDET  ha scritto:
> >
> >
> > Hi,
> >
> > Commit 76c2ff3e [0] broke backlight on Chromebook snow.
> > A revert on top of 2021.10 restores the backlight.
> > Not sure why it breaks on Chromebook snow yet. Dario, any idea how to fix 
> > this?
>
> Is it possible that max_level is equal to min_level and therefore division
> by zero is done?'

I got this running in my lab now and sent a possible fix.

Regards,
Simon


Re: Re : Re: Commit 76c2ff3e broke backlight on Chromebook snow

2021-10-23 Thread Dario Binacchi
Hi Guillaume,

> Il 22/10/2021 14:34 Guillaume GARDET  ha scritto:
> 
>  
> Hi Dario,
> 
> - Dario Binacchi  a écrit :
> > Hi Guillaume,
> > 
> > > Il 21/10/2021 16:47 Guillaume GARDET  ha 
> > > scritto:
> > > 
> > >  
> > > Hi,
> > > 
> > > Commit 76c2ff3e [0] broke backlight on Chromebook snow.
> > > A revert on top of 2021.10 restores the backlight.
> > > Not sure why it breaks on Chromebook snow yet. Dario, any idea how to fix 
> > > this?
> > 
> > Is it possible that max_level is equal to min_level and therefore division 
> > by zero is done?
> 
> I do not think so, because u-boot does not crash and the DTS file has 
> multiple levels:
> https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/exynos5250-snow.dts#L243
> 
> I think the problem occurs when 'cur_level == max_level', which is also the 
> default value in the DTS.
> If I change the default-brightness-level to 6 (instead of 7), then the 
> backlight works again, which would confirm the assumption above.

I have set the default-brightness-level to max-level on my beaglebone board but 
the backlight works the same.
I didn't see any difference.

Thanks and regards
Dario

> pwm_backlight_set_brightness seems to set cur_level to max value by default. 
> Maybe the driver thinks there is nothing to do, since current level is also 
> the desired level?
> 
> 
> Cheers,
> Guillaume
> 
> 
> > 
> > Thanks and regards,
> > Dario
> > > 
> > > Cheers,
> > > Guillaume


Re : Re: Commit 76c2ff3e broke backlight on Chromebook snow

2021-10-22 Thread Guillaume GARDET


Hi Dario,

- Dario Binacchi  a écrit :
> Hi Guillaume,
> 
> > Il 21/10/2021 16:47 Guillaume GARDET  ha scritto:
> > 
> >  
> > Hi,
> > 
> > Commit 76c2ff3e [0] broke backlight on Chromebook snow.
> > A revert on top of 2021.10 restores the backlight.
> > Not sure why it breaks on Chromebook snow yet. Dario, any idea how to fix 
> > this?
> 
> Is it possible that max_level is equal to min_level and therefore division 
> by zero is done?

I do not think so, because u-boot does not crash and the DTS file has multiple 
levels:
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/exynos5250-snow.dts#L243

I think the problem occurs when 'cur_level == max_level', which is also the 
default value in the DTS.
If I change the default-brightness-level to 6 (instead of 7), then the 
backlight works again, which would confirm the assumption above.
pwm_backlight_set_brightness seems to set cur_level to max value by default. 
Maybe the driver thinks there is nothing to do, since current level is also the 
desired level?


Cheers,
Guillaume


> 
> Thanks and regards,
> Dario
> > 
> > Cheers,
> > Guillaume



Re: Commit 76c2ff3e broke backlight on Chromebook snow

2021-10-22 Thread Dario Binacchi
Hi Guillaume,

> Il 21/10/2021 16:47 Guillaume GARDET  ha scritto:
> 
>  
> Hi,
> 
> Commit 76c2ff3e [0] broke backlight on Chromebook snow.
> A revert on top of 2021.10 restores the backlight.
> Not sure why it breaks on Chromebook snow yet. Dario, any idea how to fix 
> this?

Is it possible that max_level is equal to min_level and therefore division 
by zero is done?

Thanks and regards,
Dario
> 
> Cheers,
> Guillaume


Commit 76c2ff3e broke backlight on Chromebook snow

2021-10-21 Thread Guillaume GARDET


Hi,

Commit 76c2ff3e [0] broke backlight on Chromebook snow.
A revert on top of 2021.10 restores the backlight.
Not sure why it breaks on Chromebook snow yet. Dario, any idea how to fix this?

Cheers,
Guillaume