[PATCH v2 03/16] backlight: add backlight_is_blank()

Emil Velikov emil.l.velikov at gmail.com
Wed May 20 10:45:06 UTC 2020

On Sun, 17 May 2020 at 20:02, Sam Ravnborg <sam at ravnborg.org> wrote:
> The backlight support has two properties that express the state:
> - power
> - state
> It is un-documented and easy to get wrong.
> Add backlight_is_blank() helper to make it simpler for drivers
> to get the check of the state correct.
> A lot of drivers also includes checks for fb_blank.
> This check is redundant when the state is checked
> and thus not needed in this helper function.
> But added anyway to avoid introducing subtle bug
> due to the creative use in some drivers.
> Rolling out this helper to all relevant backlight drivers
> will eliminate almost all accesses to fb_blank.
Nit: please tweak your editor to wrap commit messages at 72 columns.

> v2:
>   - Added fb_blank condition (Daniel)
I was going to mention this, but Daniel beat me to it.

Please add an extra NOTE in the commit message. The fb_blank is a
behaviour change, albeit in the right direction.


More information about the dri-devel mailing list