From: Thierry Reding <thierry.reding@gmail.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: linux-pwm@vger.kernel.org, daniel.thompson@linaro.org,
jingoohan1@gmail.com, dri-devel@lists.freedesktop.org,
enric.balletbo@collabora.com, lee.jones@linaro.org
Subject: Re: [PATCH] backlight: pwm_bl: re-add driver internal enabled tracking
Date: Wed, 14 Nov 2018 13:35:54 +0100 [thread overview]
Message-ID: <20181114123554.GH2620@ulmo> (raw)
In-Reply-To: <20181109094857.27079-1-heiko@sntech.de>
[-- Attachment #1.1: Type: text/plain, Size: 1170 bytes --]
On Fri, Nov 09, 2018 at 10:48:57AM +0100, Heiko Stuebner wrote:
> Commit e6bcca0890b9 ("backlight: pwm_bl: Switch to using "atomic" PWM API")
> removed the driver internal enabled tracking in favor of simply checking
> the pwm state.
>
> This can lead to issues as all of gpio-, regulator- and pwm-state are used
> to determine the initial state and the bootloader or kernel can leave them
> in an inconsistent state at boot.
>
> In my case on rk3399-kevin, the pwm backlight is build as module and the
> kernel disables the supply regulator as unused while keeping the pwm running
> thus pwm_bl calling pwm_backlight_power_off() during probe and creating an
> unmatched regulator-disable call, as it never got enabled from the pwm-bl
> before.
>
> To prevent these consistency issues, reintroduce the driver-internal
> tracking of the enabled state.
>
> Fixes: e6bcca0890b9 ("backlight: pwm_bl: Switch to using "atomic" PWM API")
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
> drivers/video/backlight/pwm_bl.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
Acked-by: Thierry Reding <thierry.reding@gmail.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-11-14 12:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 9:48 [PATCH] backlight: pwm_bl: re-add driver internal enabled tracking Heiko Stuebner
2018-11-09 10:15 ` Enric Balletbo i Serra
2018-11-14 9:11 ` Uwe Kleine-König
2018-11-14 12:35 ` Thierry Reding [this message]
2018-11-16 10:22 ` Daniel Thompson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181114123554.GH2620@ulmo \
--to=thierry.reding@gmail.com \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=enric.balletbo@collabora.com \
--cc=heiko@sntech.de \
--cc=jingoohan1@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-pwm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox