Skip to contentSkip to conversation

Commit 76c2ff3e broke backlight on Chromebook snow

DISCUSSION Guillaume GARDET 3 participants 6 messages Oct 21, 2021 – Nov 3, 2021

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Hi Guillaume,

Quoted 8 lines

Il 21/10/2021 16:47 Guillaume GARDET <[email protected]> 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

Quoted 3 lines

Cheers,
Guillaume

#2 lore raw

Hi Dario,

----- Dario Binacchi <[email protected]> a écrit :

Quoted 5 lines

Hi Guillaume,

Quoted 3 lines

Il 21/10/2021 16:47 Guillaume GARDET <[email protected]> ha scritto:

Quoted 8 lines
Quoted 5 lines

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

Quoted 6 lines

Thanks and regards,
Dario

Quoted 3 lines

Cheers,
Guillaume

#3 lore raw

Hi Guillaume,

Quoted 17 lines

Il 22/10/2021 14:34 Guillaume GARDET <[email protected]> ha scritto:

Hi Dario,

----- Dario Binacchi <[email protected]> a écrit :

Quoted 11 lines

Hi Guillaume,

Quoted 8 lines

Il 21/10/2021 16:47 Guillaume GARDET <[email protected]> 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?

Quoted 8 lines
Quoted 2 lines

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

Quoted 13 lines

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

Quoted 6 lines

Thanks and regards,
Dario

Quoted 3 lines

Cheers,
Guillaume

#4 lore raw

Hi,

Quoted 23 lines · Dario Binacchi

Hi Guillaume,

Quoted 20 lines

Il 22/10/2021 14:34 Guillaume GARDET <[email protected]> ha scritto:

Hi Dario,

Quoted 13 lines · ----- Dario Binacchi

Hi Guillaume,

Quoted 8 lines

Il 21/10/2021 16:47 Guillaume GARDET <[email protected]> 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?

Quoted 8 lines
Quoted 5 lines

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

Quoted 5 lines

Thanks and regards
Dario

Quoted 1 line

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?

[..]

#5 lore raw
In reply to Dario Binacchi

Hi,

Quoted 6 lines · Dario Binacchi

Hi Guillaume,

Quoted 3 lines

Il 21/10/2021 16:47 Guillaume GARDET <[email protected]> ha scritto:

Quoted 8 lines
Quoted 5 lines

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