From: Sam Ravnborg <sam@ravnborg.org>
To: Stephen Kitt <steve@sk2.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>,
Daniel Thompson <daniel.thompson@linaro.org>,
Helge Deller <deller@gmx.de>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fbdev: atmel_lcdfb: Rework backlight status updates
Date: Thu, 9 Jun 2022 20:55:37 +0200 [thread overview]
Message-ID: <YqJCKQmQEuVsbspK@ravnborg.org> (raw)
In-Reply-To: <20220609180440.3138625-1-steve@sk2.org>
Hi Stephen, thanks!
On Thu, Jun 09, 2022 at 08:04:40PM +0200, Stephen Kitt wrote:
> Instead of checking the state of various backlight_properties fields
> against the memorised state in atmel_lcdfb_info.bl_power,
> atmel_bl_update_status() should retrieve the desired state using
> backlight_get_brightness (which takes into account the power state,
> blanking etc.). This means the explicit checks using props.fb_blank
> and props.power can be dropped.
>
> The backlight framework ensures that backlight is never negative, so
> the test before reading the brightness from the hardware always ends
> up false and the whole block can be removed. The framework retrieves
> the brightness from the hardware through atmel_bl_get_brightness()
> when necessary.
>
> As a result, bl_power in struct atmel_lcdfb_info is no longer
> necessary, so remove that while we're at it. Since we only ever care
> about reading the current state in backlight_properties, drop the
> updates at the end of the function.
>
> Signed-off-by: Stephen Kitt <steve@sk2.org>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Helge Deller <deller@gmx.de>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Sam
prev parent reply other threads:[~2022-06-09 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 18:04 [PATCH v2] fbdev: atmel_lcdfb: Rework backlight status updates Stephen Kitt
2022-06-09 18:55 ` Sam Ravnborg [this message]
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=YqJCKQmQEuVsbspK@ravnborg.org \
--to=sam@ravnborg.org \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=daniel.thompson@linaro.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=steve@sk2.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;
as well as URLs for NNTP newsgroup(s).