From: Marek Vasut <marex@denx.de>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
"Meghana Madhyastha" <meghana.madhyastha@gmail.com>,
"Noralf Trønnes" <noralf@tronnes.org>,
"Sean Paul" <seanpaul@chromium.org>,
"Thierry Reding" <treding@nvidia.com>
Subject: Re: [PATCH] video: backlight: Only set maximum brightness for gpio-backlight
Date: Fri, 9 Jul 2021 15:19:47 +0200 [thread overview]
Message-ID: <6330fc87-333e-f507-0a39-3ca1bfa6b39f@denx.de> (raw)
In-Reply-To: <20210709110315.vv5hbngg26o4vj63@maple.lan>
On 7/9/21 1:03 PM, Daniel Thompson wrote:
> On Thu, Jul 08, 2021 at 11:10:58AM +0200, Marek Vasut wrote:
>> The note in c2adda27d202f ("video: backlight: Add of_find_backlight helper
>> in backlight.c") says that gpio-backlight uses brightness as power state.
>> Other backlight drivers do not, so limit this workaround to gpio-backlight.
>>
>> This fixes the case where e.g. pwm-backlight can perfectly well be set to
>> brightness 0 on boot in DT, which without this patch leads to the display
>> brightness to be max instead of off.
>>
>> Fixes: c2adda27d202f ("video: backlight: Add of_find_backlight helper in backlight.c")
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Daniel Thompson <daniel.thompson@linaro.org>
>> Cc: Meghana Madhyastha <meghana.madhyastha@gmail.com>
>> Cc: Noralf Trønnes <noralf@tronnes.org>
>> Cc: Sean Paul <seanpaul@chromium.org>
>> Cc: Thierry Reding <treding@nvidia.com>
>
> I have to admit that this patch really does makes it clear just how
> nasty the hack in of_find_backlight() currently is.
>
> Moreover I think it is also be obsolete. gpio-backlight power mode
> handling was pretty broken when this code was introduced. It was fixed
> in 2019 by ec665b756e6f ("backlight: gpio backlight: Correct initial
> power state handling") by trying to match the behaviour of PWM
> backlight. The new code always sets the brightness to 1 so I think we
> can just remove the hack from of_find_backlight() since I think it is
> unreachable.
I assume by "new code" you mean the fixed gpio-backlight driver ?
Dropping the whole code after the Note: is fine by me.
next prev parent reply other threads:[~2021-07-09 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 9:10 [PATCH] video: backlight: Only set maximum brightness for gpio-backlight Marek Vasut
2021-07-09 11:03 ` Daniel Thompson
2021-07-09 13:19 ` Marek Vasut [this message]
2021-07-09 13:25 ` Noralf Trønnes
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=6330fc87-333e-f507-0a39-3ca1bfa6b39f@denx.de \
--to=marex@denx.de \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=meghana.madhyastha@gmail.com \
--cc=noralf@tronnes.org \
--cc=seanpaul@chromium.org \
--cc=treding@nvidia.com \
/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;
as well as URLs for NNTP newsgroup(s).