Repository navigation
drm/apple: dcp: firmware 27 panel: bind powerlog-service on T8142, keep presents without a surface - #1696
Open
sithglan wants to merge 2 commits into
Open
drm/apple: dcp: firmware 27 panel: bind powerlog-service on T8142, keep presents without a surface#1696sithglan wants to merge 2 commits into
sithglan wants to merge 2 commits into
Conversation
sithglan
force-pushed
the
thomas/fw27-dcp-backlight
branch
from
November 12, 2026 13:59
d5a1a59 to
850e0bd
Compare
RyanTheTide
reviewed
Nov 12, 2026
RyanTheTide
left a comment
Contributor
There was a problem hiding this comment.
The surfaceless present now goes out with the last completed level, and the KUnit case shows the pending level waits for the next surface. We ran it on the J700 (H17P present path): new KMS clients, VT switch, blank/unblank and brightness steps, with no dropped presents and the level held. Looks good.
The M5's DCP announces powerlog-service on ep:20 with only
ep-has-desc-mgr and interface-id. AFK matches such a service by its
announced name, but only for the H17G method profile, and a T8142 on
firmware 27 runs the default profile. So on 27.0 and 27.2 the service is
never bound ("AFK[ep:20]: failed to extract init props: -2"), and the
mNits reports it carries, the loader-level hint that
dcp_backlight_takeover() takes on firmware 27, could never arrive.
Fall back to the announced name for a T8142 on firmware 27 as well: the
H17P-generation processor (hw.firmware_compat) that probe admits as
firmware 27. The service-rebind host test's apple_dcp gets that field.
On 27.2 the service now binds on channel 1. That firmware sent no report
in the first minutes after boot, so the backlight still starts from the
fallback level there.
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
On firmware 27 the first present of a new KMS client (modetest, kmscube) fails with "present dropped: backlight prepare -61" and "swap failed!", and modetest -v then sees no page flip. With the panel backlight active, iomfb_apply_backlight_h17p() drops every present that dcp_backlight_prepare() refuses. dcp_bl_prepare() refuses a present without a surface with -ENODATA, because such a present cannot apply a new level, so the whole present is dropped rather than only the level. Treat a present without a surface as one with nothing to reserve: it carries the last completed level and is sent, and a pending level waits, still dirty, for the next present with a surface. Only the H17P/firmware 27 path asks without a surface; the M4 and 14.7 callers always pass one. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Contributor
Author
|
@RyanTheTide thanks for the J700 run. The branch no longer merged into integration, so I rebased it onto 673f618. It is now 55d5f6d (was 850e0bd).
|
sithglan
force-pushed
the
thomas/fw27-dcp-backlight
branch
from
November 13, 2026 06:45
850e0bd to
55d5f6d
Compare
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.
Base: integration/aurora (673f618). Branch thomas/fw27-dcp-backlight, two commits. They were found while bringing the J813 (M5 MacBook Air) up on the macOS 27.2 stub (#1683), and both also apply to 27.0.
drm/apple: dcp: Send a present without a surface at the completed level
With the panel backlight active,
iomfb_apply_backlight_h17p()drops every present thatdcp_backlight_prepare()refuses.dcp_bl_prepare()refuses a present without a surface (-ENODATA), because such a present cannot apply a new level. As a result the whole present is dropped, not only the level. On firmware 27 the first present of every new KMS client hits this: modetest and kmscube log "present dropped: backlight prepare -61" and "swap failed!".A present without a surface is now treated as one with nothing to reserve. It carries the last completed level and is sent, and a pending level waits, still dirty, for the next present with a surface. Only the H17P/firmware-27 path asks without a surface; the M4 and 14.7 callers always pass one. There is a new KUnit case,
v14_bl_surfaceless_present. It fails without the change (-ENODATA instead of -EALREADY) and passes with it.drm/apple: afk: T8142: Bind powerlog-service on firmware 27
The M5's DCP announces powerlog-service on ep:20 with only
ep-has-desc-mgrandinterface-id. AFK matches such a service by its announced name, but only for the H17G method profile, and a T8142 on firmware 27 runs the default profile. So the service was never bound ("AFK[ep:20]: failed to extract init props: -2"), and its mNits reports could not reachdcp_backlight_takeover().The name fallback now covers a T8142 on firmware 27 too: the H17P-generation processor (
hw.firmware_compat) that probe admits as firmware 27. The service-rebind host test'sstruct apple_dcpgets that field. On 27.2 the service binds on channel 1. That firmware sent no report in the first minutes after boot, though, so the backlight still starts from the fallback level there. The loader's level is in NVRAMbacklight-nits(0x008c0000, 140 nits), and userspace restores it.Testing
Tested on the J813 under the macOS 27.2 stub, on top of #1683, with aura aurora-silicon/aura#192 (chainloaded in place). The hardware run used an equivalent check,
of_device_is_compatible(..., "apple,t8142-dcp"), which the host test cannot compile; on the J813 both conditions hold:AFK[ep:20]: new service powerlog-service on channel 1, and no init-props error.modetest -M apple -s 43@41:2560x1600@AR24 -vflips at 60.00 Hz, and kmscube starts, with no "present dropped" and no "swap failed". Before, modetest's and kmscube's first present was dropped.CONFIG_DRM_APPLE_DISPLAY_KUNIT_TESTsuites: 101 passed, 1 skipped, on this branch and on top of drm/asahi, drm/apple: J813 (M5 MacBook Air) GPU and display on the macOS 27.2 firmware #1683.tools/asahi/run-host-tests.py --only apple-dcp: 88 of 88 pass.cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10