Repository navigation
Conversation
…s a DAC value The DAC tables are far finer than whole nits, and at the dim end of the range a whole nit is a step of 10 to 25 %: a slow change of level, such as one following the ambient light, is a visible staircase there. Where a swap carries a DAC value, let the backlight device count in millinits. The H17G panel shares the registration but takes whole nits in its swaps, and keeps them. The level read back is the one presented last, or before the first present the firmware's own report, in the same units. At every whole nit the DAC word is the one the whole-nit arithmetic gave (compared on the host for 0 to 520 nits, both kinds of panel). Assisted-by: LLM
Contributor
Author
|
This commit now lives in #2844 together with the off-at-0 change, since both touch the same backlight path and are easier to review as one. Closing this one in favour of it. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! This comes from letting the panel follow the ambient light on my J314s. The backlight device counts in whole nits, and at the dim end one nit is a step of 10 to 25 %, so a slow change of level is a visible staircase there, although the DAC tables are much finer than that.
Where a swap carries a DAC value this lets the backlight device count in millinits, so max_brightness on the J314s goes from 500 to 500000. The H17G panel shares the registration but takes whole nits in its swaps, and keeps them. The level read back is the one presented last, or before the first present the firmware's own report, in the same unit. At every whole nit the DAC word is the one the whole-nit arithmetic gave; I compared that on the host for 0 to 520 nits and both kinds of panel. One small change rides along: a level at the very end of a table now gives the table's last entry instead of the WARN and the middle entry.
On the machine, with main at 3a6d154 plus this and my other open drafts, every level I wrote read back the same in brightness and actual_brightness, 2500 and 20500 included, and the ambient light sensor next to the panel rose with the level in a dark room. I run the same change on my daily kernel, which is an older base. I have not booted main with only this commit, so it is a draft until then and until my sign-off is on it.
The part I'd like your opinion on is the unit itself, since user space sees it: max_brightness becomes a thousand times larger on these panels, and a level saved under the old kernel is read in the new unit on the first boot. systemd-backlight restores at least 5 % of the maximum, so it should not come up black, but I have not tried that transition. If you'd rather keep whole nits in the backlight device and expose the finer scale some other way, I'm happy to rework it.
Thanks for looking!