Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[display] Flush cached brightness when adjustment fails. Fixes JB#47229
In devices which use kms/drm (such as Sony Xperia 10) all adjustment attempts made while display is not ready get ignored and brightness gets reset on compositor change. The mce side brightness value caching is not prepared to handle this kind of situation, which easily leads to display staying dimmer than expected due to cached value getting out of sync with reality. Flush cached brightness value on adjustment failures. Update cached brightness value only after successful adjustments. Add helper functions for performing common tasks. As the logic still makes adjustment attempts in situations where they are not going to be accepted by drm drivers, tweak logging to reduce noise from adjustment failures a bit. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
- Loading branch information
Showing
1 changed file
with
52 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters