]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
backlight: ktd253: Stabilize backlight
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 15 Jul 2021 11:36:36 +0000 (13:36 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 09:19:30 +0000 (10:19 +0100)
commitbc8976b6c7d7f5bc5bf07ba1b5818cd640d4fb12
treed5756ec638d11527b48e343001d4dc704c06472c
parentc5d76354aa67be5fafbdaae94625d42962be70b7
backlight: ktd253: Stabilize backlight

BugLink: https://bugs.launchpad.net/bugs/1948873
[ Upstream commit daa37361518bf2d1f591bbdaa7c68b2a43d7af48 ]

Remove interrupt disablement during backlight setting. It is
way to dangerous and makes platforms instable by having it
miss vblank IRQs leading to the graphics derailing.

The code is using ndelay() which is not available on
platforms such as ARM and will result in 32 * udelay(1)
which is substantial.

Add some code to detect if an interrupt occurs during the
tight loop and in that case just redo it from the top.

Fixes: 5317f37e48b9 ("backlight: Add Kinetic KTD253 backlight driver")
Cc: Stephan Gerhold <stephan@gerhold.net>
Reported-by: newbyte@disroot.org
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/video/backlight/ktd253-backlight.c