Repository navigation
drm/apple: fade the panel backlight on DAC firmware - #983
Merged
Merged
Conversation
On M1 and M2, the DCP firmware takes the panel level as a DAC value in each swap and shows it at once. Every brightness change is therefore a visible jump. Automatic brightness makes this obvious: GNOME moves the level a step every 0.8 s, and each step snaps. The 250 ms fade the driver already has covers only the firmware that presents nits (H17P, 14.7 panels) and the M4. Fade there too. A new level starts a fade from the level set last, and a worker steps it every DCP_BL_FADE_STEP_MS over DCP_BL_FADE_MS. Each step rides on the compositor's next swap, or is presented on its own when no swap took it within a step. Blanking, unblanking and a display with no mode still jump. A write no longer sleeps 42 ms before returning. Tested on a J414s (M2 Pro, firmware 13.5) with GNOME automatic brightness. A change from 380 to 120 nits ramps through about 13 levels over 250 ms instead of jumping, and a 500 to 153 drop after the room went dark looked smooth. Assisted-by: Claude Opus 5.5 Signed-off-by: DjDeveloperr <hey@djdev.me>
This was referenced Nov 5, 2026
Contributor
|
Fleet17 gate (integration/aurora 2661d71, 11-06): the apple-dcp host selftests are now 83/85. |
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.
Problem
On M1 and M2, the DCP firmware takes the panel level as a DAC value in each swap and shows it at once, so every brightness change is a visible jump. Automatic brightness makes it obvious: GNOME moves the level a step every 0.8 s, and each step snaps. The driver's 250 ms fade covers only the firmware that presents nits (H17P, 14.7 panels) and the M4.
Fix
DCP_BL_FADE_STEP_MSoverDCP_BL_FADE_MS.dcp_backlight_stop().Tested
On a J414s (M2 Pro, firmware 13.5) with GNOME automatic brightness, running Aurora Fedora 44 kernel 7.3.0-16 with this change in
appledrm.ko:actual_brightness, instead of jumping.Build-tested on this branch's base 56da950:
appledrm.kowith W=1, no new warnings.🤖 Generated with Claude Code