Skip to content

J616s consolidation: batch5 kernel on the current integration/aurora - #533

Merged
RyanTheTide merged 192 commits into
integration/aurorafrom
j616s/consolidate-20261028
Oct 28, 2026
Merged

RyanTheTide merged 192 commits into
integration/aurorafrom
j616s/consolidate-20261028

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

This brings the J616s (M4 Pro) kernel that runs on the hardware today into integration/aurora, on top of the current tip. integration/aurora fast-forwards to it.

What it carries

Testing

  • Kernel built with the universal config, WERROR and FORTIFY: 0 warnings, 5,863 modules (release 7.3.0-aurora-consol1). The built tree is df67d69; the head adds only the selftest commit.
  • apple-dcp host selftests: 80/80 (batch5 was 56/80).
  • asahi-m4 golden and MMU suites, G17 resource tests and the DART range harness all pass. All four fail on the current integration/aurora tip.
  • The tether DTB is byte-identical to batch5's. Batch5's kernel is what runs on the J616s now (display at 1920x1080@180, EDID named, 20/20 mode switches).
  • Still to run: a J616s boot of this exact image and a Neo smoke. Both candidates are staged.

Supersedes

🤖 Generated with Claude Code

Use the shared 250 ms nits ramp on desktop 26.6 panels and account
brightness only after the matching accepted present completes. Keep the
loader level until a request, support zero nits, and retain the restore
target across blanking and power changes.

Validate internal refresh ranges without losing their fixed timings,
retain fractional rates and sync polarity from TimingElements, and keep
desktop presentation deadlines for fixed ProMotion. Add opt-in adaptive
sync with fixed-refresh retry and watchdog recovery, leaving the
established fixed-refresh default intact.

Exercise ramps, real mode parsing, ranges and adaptive-sync callback
failures in the host runner, and extend the backlight and mode KUnit
suites.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…ests

Accept the first bounded powerlog hint before backlight registration,
including a valid zero-nit hint. Otherwise report the same midpoint
default as H17P while preserving the loader level. Handle firmware
brightness resend requests through the shared policy.

Reject unsupported desktop VRR requests before commit, allow the
recovery commit to restore fixed refresh, and withdraw the capability
after a failed adaptive modeset. Retry a rejected bootstrap at fixed
refresh too.

Extend the host tests for takeover hints and atomic VRR admission. Align
the new documentation with the display maintainer patterns.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A malformed adaptive-sync range must leave the fixed 120 Hz timing
usable. Keep its presentation-deadline requirement separate from VRR
capability, and distinguish omitted range fields from explicit zeros.

Notify capability withdrawal once per adaptive-sync failure so the
fixed-refresh recovery does not generate repeated hotplug notifications.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Let the receive callback and watchdog claim each desktop swap once.
Track clear swaps too, ignore late or duplicate completions, and retain
buffers displaced by a dropped swap until a later swap completes.

Test watchdog recovery and stale completion isolation in the host runner
and exercise desktop completion claims in KUnit.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Desktop brightness is reserved and encoded after swap_start. Compile the
legacy update flag only in the instances that consume it, fixing the
unused-variable warning with WERROR enabled.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Keep desktop presentation deadlines for reported rates just above 120 Hz
too. The fixed timing remains the rate DCP supplied; this only
classifies its ProMotion presentation requirement. Extend the real
parser fixture with a slightly higher nominal timing.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The hotplug worker synchronises connector backlight state. Construct
that state in the relink fixture before running the real worker and
balance its teardown. Initialise the desktop retry work in the
announcement fixture before teardown can cancel it.

This fixes the uninitialised backlight mutex warning with
panic_on_warn=1 in the arm64 KUnit run.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Re-present the affected planes for a brightness-only commit without
marking color management changed. With a user gamma LUT installed, that
flag would otherwise resend the gamma table at every fade step. Keep the
legacy brightness trigger for the other firmware paths.

Exercise the real atomic backlight helper with an active gamma LUT,
blanked and clean states, and allocation failure in the host runner.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Initialise the metadata lock with the mode catalogue, matching probe.
The deferred-attribute test also needs an initialised hotplug work item
and backlight notification state now that attributes can queue them.
Drain those fixture-owned workers before releasing their storage.

This fixes the lockdep key report and uninitialised work warning in the
strict arm64 parser KUnit run.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The strict route preparation path snapshots the tunnel session under
hpd_mutex and tb_lock before checking the PHY. Initialise both locks in
the fixture, matching the probe, so panic_on_warn can reach the intended
missing-PHY result.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Supply the desktop capability boundary for the external H17P rate
fixture, which cannot select that firmware, and the refresh rounding
helper used by connector range publication. Preserve the firmware
lineage and lookup extraction from the current display base.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…inition

The desktop VRR admission check calls lookup_mode before its definition.
Extract the definition explicitly so the publication fixture does not
start in the middle of the admission check or duplicate unrelated
helpers.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Desktop firmware may supply both variable-refresh fields as zero
placeholders. Treat that pair like an omitted range so the internal
ProMotion timing gets its 24 Hz lower bound and native upper bound. Keep
partial, duplicate and invalid ranges fixed.

Cover the zero pair through the real parser in KUnit and host tests,
including rejection of partial zero fields.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Report ENODATA for desktop actual_brightness until a loader hint or an
accepted, completed brightness present establishes the panel level. A
reporting midpoint must not be saved and restored as a measured level by
userspace.

Keep framebuffer unblank and core suspend notifications from acquiring
brightness control while the inherited level is unknown. Accept the
first bounded loader hint after registration until a user request takes
ownership. Test unknown-level reads, lifecycle notifications, rejected
presents and explicit writes in KUnit and host coverage.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Brightness restore clients can read brightness and write the same value
back before a loader hint arrives. On the desktop panel that value is a
reporting default, so leave the inherited panel level alone. A hint or a
different target establishes brightness control.

Keep this policy specific to desktop takeover. Add KUnit and host
coverage for an echoed midpoint and for a new target becoming known only
after its accepted present completes.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…tore

Run the actual registration, get_brightness, controls_device and
update_status functions with the backlight-core boundary mocked. Check
that echoing the midpoint and core suspend notifications preserve an
unknown panel level, while a different target takes control and only its
completed present publishes actual_brightness.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A loader hint can arrive after the backlight property snapshot or while
a user writes a new target. Synchronize its reporting value under the
backlight ops lock and the panel state lock, without the unconditional
actual-to-target copy performed by backlight_force_update().

Reconcile a hint that arrived during device registration too. The host
registration test covers both that boundary and a user write racing the
hint notification. Neither path submits a brightness change on its own.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A pair of zero range fields is missing metadata on desktop 26.6, but
older panel paths may use it as an explicit fixed-refresh range. Carry
the firmware convention in the parse context instead of applying it to
every internal ProMotion panel.

Exercise the actual catalog replacement path in KUnit for desktop and
legacy firmware, and retain host coverage for zero placeholders, absent
fields, partial ranges and duplicates.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Keep the inherited panel level untouched until an explicit target changes.
Report the target while no loader hint or completed present has supplied a
measured level, then report the completed level. An unchanged reporting
default still cannot acquire brightness control.

Use the reporting level as the first fade's origin when the loader report
is absent. A valid hint remains the preferred origin. Cover readback,
unchanged restore, the first fade and its completion in KUnit and the host
backlight fixture.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The shared template pairs descriptor allocation and release with D452 physical mapping. The public native 26.6 backend also handles D588 as an empty resize notification. Bind both in the desktop table after its D202/D454 adapters, preserving the shared display-register bounds and resource ownership checks.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Bound callback envelopes and descriptor records before decoding. An unknown callback during a mode set gets an unsupported zero reply and records an error. Drain the real enclosing RPC ACK, stop the continuation and return EOPNOTSUPP. Signal an error on the accepted atomic operation out-fence. A timed-out command retains ownership of its busy channel.

Exercise the contributor-provided desktop D202/D454 adapters and their normal allocation lifecycle. Inject an unknown callback during A413, drain the ACK, fail that set and complete a later set. Check every mode-selection continuation boundary. Keep the panel mode list from DCP now that the known mode-change callbacks are handled.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The internal desktop panel has no external EDID service. Its product
identity was also excluded from the firmware-derived EDID path, leaving
userspace without monitor identity strings.

Parse the panel ProductAttributes independently of optional color fields
and publish an identity-only EDID base block. Keep DCP TimingElements as
the authoritative mode list, including timings which EDID cannot encode.
Use the panel dimensions already supplied by the device tree, and retain
the firmware vendor, product and serial without embedding device data.

Protect replacement and allocation with an identity generation check.
Cover the real parser, EDID checksum and identity bytes, metadata
replacement and other-profile exclusion in host tests, plus KUnit.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The compact report dispatcher removed an eight-byte command descriptor
from every standard-service report. A bare serialized dictionary loses
its header there, so systemep rejects it before it can decode the mNits
event or establish a takeover hint.

Recognize the bounded serialization header and dictionary tag before
removing a descriptor. Keep the existing descriptor-wrapped report path.
Do not scan arbitrary offsets or manufacture a brightness sample.

The host test sends both report forms through the production compact
receiver, systemep handler and dictionary parser, and verifies the decoded
hint. It also reproduces the old header-loss failure and rejects truncation.
KUnit covers the exact header boundary.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Use the first bounded report only to establish an unknown takeover level. Once Linux has a level or a user target, retain firmware observations separately from the target, fade position and accepted present. A delayed or non-monotonic report must not replace a request, mark it dirty, restart a fade or generate a new write.

Continue decoding reports after backlight registration so they can confirm output without driving policy. Preserve the backlight target under its existing state lock and synchronize only the initial takeover hint with the registered device.

Add a host regression with rapid increasing and decreasing key repeats, interleaved old and new reports, both completion/reply orders and late reports after settling. Assert monotonic output and convergence to the last user target. Add KUnit for report ownership through a fade and retarget.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Retain the synthetic panel identity EDID with host artifacts so a userspace parser can independently validate its monitor strings. Document panel identity, report framing and brightness ownership alongside the existing ramp and adaptive-sync policy.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Provide a representable preferred timing and catalog limits for a conformant panel EDID. Select a base-block timing from the actual DCP catalog, including when the preferred high-refresh clock exceeds the base EDID format. Round only the EDID clock to its 10 kHz units; the DRM mode catalog stays unchanged.

Derive vertical limits from the validated adaptive range or fixed mode rates, and horizontal and clock limits from the same retained catalog being published. Use EDID 1.4 frequency offsets above 255 kHz. This also preserves the panel adaptive-sync range when DRM reads the new EDID.

Extend the host and KUnit cases with a high-clock 120 Hz mode, a representable 60 Hz mode with a fractional clock, and 24-120 Hz adaptive limits. The retained synthetic EDID passes edid-decode conformance validation.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Preserve the established active-report filter for the Neo and other non-desktop backends. The desktop backlight uses its separate ready state, so T6041 reports still reach the confirmation-only policy after registration. This avoids exposing unrelated backends to newly parsed report traffic.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A repeated or partial DisplayAttributes dictionary must not revoke a known internal panel identity or emit another hotplug event. Retain the validated identity when a dictionary omits product data, and advance its generation only when valid identity fields change.

This keeps unrelated attribute updates from making userspace reprobe the monitor and restore brightness again. Extend the host case with repeated and partial dictionaries and an actual identity replacement, and add KUnit for the fixed-panel cache lifecycle.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The desktop dictionary setters previously acknowledged every property without retaining its data. Decode DisplayAttributes and direct ProductAttributes on the fixed panel, alongside the existing chunked path. Bound their input records and preserve the existing boolean acknowledgment, including byte and padded results, for null or unrelated properties.

Accept a legacy PNP manufacturer code and derive a missing model label from the actual vendor/product IDs. Keep unspecified serial and label fields from erasing known data for the same fixed panel. Optional manufacture fields do not control identity parsing.

Extend the host case through the actual D552/D561 bindings, with both dictionary forms, minimal identity, null and unrelated setters, reply canaries and partial updates. External metadata parsing and the contributor DMA callbacks remain unchanged.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The desktop dictionary setters run without supplying the identity keys we
expected. Add opt-in structural inspection to D552, D561, D114 and chunked
properties. Bound the traversal by depth and entries and the output per
DCP, and emit keys and types only. The default stays silent.

Exercise malformed, truncated and oversized dictionaries on the host and
in KUnit. No captured firmware values are included.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
RyanTheTide and others added 21 commits October 27, 2026 20:45
The T6041 firmware protocol has not been qualified against the legacy SIO backend. Describe its resources with a generation-specific compatible, so a loader cannot accidentally bind that backend by enabling the node.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Keep the existing host bus range while the SD port is disabled. Generic ECAM access does not filter unavailable OF ports, so describing that port must not expand downstream configuration probing before its power handoff is qualified.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…tree

Allow a machine card to describe speaker identity inputs with speaker-id-gpios, least significant bit first. Expose their logical levels in a read-only volatile Speaker Variant ID control. Cards without the property retain their existing controls. Describe the two J616s speaker variant inputs on AP GPIO 52 and 53.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Register the optional read-only identity control in late_probe, after the existing card and codec controls have been created. Their numeric identifiers remain stable when a board gains speaker-id-gpios.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The complete power-state table and the SEP series both describe SPI_P,
SPI2 and SEP. Replaying their individual patches during a rebase leaves
duplicate nodes whose later disabled status overrides the enabled
suppliers required by the SPI2 fingerprint transport and SEP.

Keep one definition of each physical power state and retain the enabled
SEP-series definitions, as in the previously integrated tree. This also
restores the active-provider invariant checked against the compiled DT.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The synthetic retry fixture left boolean state uninitialized, which let sanitizer runs fail before exercising the intended budget. Start it from the same zero state as the other fixture cases.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The 25G83 firmware reads the tiling descriptor's fragment_busy word
(TA+0x7a4) only in its out-of-memory lane, at the first out-of-memory
stop of a pass. When it is non-zero the firmware compares the pass-seq
byte of the last completed fragment kick on that queue with the lane's
copy of TA+0x7b0. On a mismatch it resumes the stopped TA with the
resume-after-grow register write but without adding memory, and retires
the lane: the tiler then stops silently with no further out-of-memory
stop and no completion, and the forward-progress watchdog fires
(reason 0).

We set fragment_busy whenever the previous fragment kick had not
completed at publish, which is common in a pipelined stream. macOS
always writes 0 there on this firmware. Add Variant::fragment_busy and
clear it for V25G83, so the out-of-memory lane takes the path macOS
takes. Renders that fit their tiler heap never reach that lane, so they
are unaffected. V26A428 keeps its current behaviour.

The firmware behaviour above is from a static disassembly of the 25G83
firmware and the macOS AGXG16X kext.

In our testing on a J616s (T6040, 25G83), with the tiler heap at its
tile-count size so ordinary heavy passes must grow, this alone took
dEQP-VK.memory.pipeline_barrier.graphics.all_device.1048576_vertex_buffer_stride_2
from 7 firmware recoveries over three runs to 4; the next change
removes the rest.

Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com>
Assisted-by: LLM
Commit 0d9efa5 ("drm/asahi: g17: render lead commands for the 25G83
firmware") led every 25G83 fragment descriptor with a FragmentBarrier
(tag 4) that waits for the paired tiling stamp. macOS does not send
that item: its fragment submission stores item tags 1, 0xc, 0xe, 0xf
and 0x10 only, and keeps fragment-after-tiling ordering in the kick
entry's dependency 0, which we already set.

The barrier deadlocks a pass that runs out of tiler memory. The
firmware's item-ring loop stops at an item whose handler returns 0, and
the tag-4 handler returns 0 until the tiling stamp is reached, so the
fragment kick's AddKicks is only processed after its tiling pass
completes. A partial render needs that fragment kick announced while
the tiling pass is stopped (the firmware releases it in out-of-memory
state 7 by clearing the kick entry's dependency 0), so the tiling pass
waits for the partial render and the partial render waits for the
tiling pass.

Remove FragmentBarrier and write only InitBufferManager as a lead
command. V26A428 has no lead commands and is unaffected.

The firmware behaviour above is from a static disassembly of the 25G83
firmware and the macOS AGXG16X kext.

On a J616s (T6040, 25G83), with the tiler heap left at its tile-count
size so ordinary heavy passes must grow, this and the previous change
take dEQP-VK.memory.pipeline_barrier.graphics.all_device.1048576_vertex_buffer_stride_2
from 7 firmware recoveries over three runs to none. A 1/2000
vk-default slice is 769 pass / 0 fail / 0 crash, and the desktop and
GL clients render as before.

Fixes: 0d9efa5 ("drm/asahi: g17: render lead commands for the 25G83 firmware")
Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com>
Assisted-by: LLM
…261027

hwmon: macsmc: Unlock fan control on firmware that keeps fans in system mode
Publish the entered partner DisplayPort alternate mode, consume SPMI events latched before IRQ registration, expose pin E, and provide the connector fwnode fallback. The tether route gate follow-up belongs with #451 and is included in the batch3 candidate.

Assisted-by: LLM
#516, #519 and #451

This is the tree of the J616s test kernel 7.3.0-aurora-j616s-batch5, built
from these parents:

- wip/j616s-batch1-20261027 (e1a25b5): the J616s bring-up series
- integration/aurora 647f084 (includes #498, #512, #523 and DJ's G17 merges)
- #518 ad14f2d: 25G83 tiler growth fix (Jonathan Goyvaerts)
- #516 31340ab: T6040 two-lane DP pin D beside USB3
- #519 d769aaf: tipd reconcile of firmware-entered J616s DP Alt Mode
- #451 0d43a7f: J616s external displays (František Balázsy)

Resolution notes:
- #451's display code supersedes the older #451 copy carried by batch1,
  including its desktop 26.6 adaptive sync. Batch1's callback guard,
  ProMotion presentation timestamps, minRR=0 restore and swap watchdog stay.
- The display gate finds a Type-C route's PHY by its typecN name, so #451's
  dcpext0 route@0 is not enabled on a tether whose ATC0 PHY is disabled.
- #516's pin D and #519's tipd reconcile are kept as in the J616s series.
  Batch2's selftest fixture reconcile for the G17 owner and CLPC fixtures is
  part of this tree.

Tested on the J616s with the follow-up commits: boots with 0 WARN, external
display at 1920x1080@180 through DP Alt Mode, 20/20 mode switches and
15/15 DPMS cycles with no new kernel errors.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
dcp_peer_hints_26_6() clears the 32-byte allocation block of the display
hints (primary and peer endpoint IDs, extra pipe count, flags and the
reserved bytes) with memset(&r->primary_id, 0, 32). FORTIFY_SOURCE sees a
write of 32 bytes into the 4-byte primary_id field and fails the build
with -Werror (__write_overflow_field), so dcp.o does not compile with the
Fedora-based release configuration.

Group the allocation fields with struct_group_attr(), keeping the packed
layout, and clear the group by its size. The offsets are unchanged and a
new static_assert pins the group at 32 bytes.

Fixes: e3e7131 ("drm/apple: drive a display wider than one pipe with two desktop 26.6 pipes")
Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
(cherry picked from commit e2f5382def10e2b927edcd79a55120c9b1cbac4d)
The actual-DCP route fixtures compile the real dcp_typec_route_set(),
dcp_typec_route_deactivate() and dcp_typec_route_available(). The
J616s series added hybrid hand-over state to them. Deactivation now
clears peer_starved and typec_narrow, releases a desktop 26.6 peer and
restores the fixed output through its own fixed_xbar. A port leaving
DP clears typec_yielded and dcp_hybrid_fails and hands every yielded
hybrid on the port's routes back to HDMI. Availability asks
dcp_typec_hybrid_first(). The mock struct apple_dcp and port had none
of this, so seven units no longer compiled.

Add the fields and a counter. Extract the real dcp_typec_hybrid_first()
over the production defaults (module parameter -1, no DT opt-in), so
the policy is as before. Stub the peer release to assert, since no
scenario is on desktop 26.6. Let the single-port list walk yield the
port's one route when it walks routes.

Probe now records the fixed output's crossbar in fixed_xbar as well
as xbar (7b99095), and deactivation restores the fixed route
through fixed_xbar. The mux-release-stages fixed-restore case set
only xbar, so set both as probe does. Its assertions are unchanged:
the restore is retried once after its failure and the deselect stays
balanced.

Fixes: 7b99095 ("drm/apple: fabric: keep the hybrid pipeline's HDMI crossbar apart from its Type-C route's")
Fixes: 0d43a7f ("drm/apple: fabric: hand the hybrid between an HDMI and a two-pipe Type-C display")
Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
(cherry picked from commit e549591ec26d877731f574c98b82b8fd1052cd8d)
Desktop 26.6 now takes adaptive sync with a mode set. 562eb4c
removed dcp_mode_vrr_supported(), which the publication fixture
extracted unconditionally. 6477da6 made dcp_crtc_atomic_check()
turn a VRR_ENABLED change on that firmware into a mode set, through
drm_atomic_get_old_crtc_state() and crtc_state->mode_changed, which
the VRR admission fixture did not model. So publication-hpd failed
to build its unit and vrr-rejection did not compile.

Extract the VRR filter only where the source still has it. Give the
VRR fixture the desktop firmware value, mode_changed and an old-state
lookup that counts its calls. The existing 72 admission cases run
unchanged and now also check that no other firmware looks at the old
state or forces a mode set. Where the source has the desktop path, 12
more cases pin it: an enabled CRTC whose VRR_ENABLED differs from its
old state gets mode_changed, and nothing else does (a disabled CRTC,
an unchanged VRR_ENABLED, no old state).

Fixes: 562eb4c ("drm/apple: enable adaptive sync on desktop 26.6 external displays")
Fixes: 6477da6 ("drm/apple: enable adaptive sync on the desktop 26.6 internal panel")
Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
(cherry picked from commit 6822701ad2722a56da72ac27cfb0e6561b901029)
The batch5 merge takes #451's desktop 26.6 adaptive sync and removes the
J616s series' parameter sequence (dcp_modeset_sync(), its fixed-refresh
fallback on a rejected VRR mode set) and its admission gate
(dcp_desktop_vrr_check(), dcp_desktop_vrr_supported()).

Retire panel-adaptive-fallback, which drove only that removed sequence;
vrr-rejection now pins #451's VRR_ENABLED-to-mode-set admission.
Drop the stubs other fixtures kept for the removed functions
(desktop-unknown-modeset-recovery, vrr-rejection), which no longer
compile as unused. In the publication fixture, take lookup_mode() by
its definition: the J616s takeover check starts a line with a
lookup_mode() call, which the line-start pattern matched first.

panel-adaptive-watchdog is unchanged: the fixed-refresh latch after an
adaptive swap times out remains.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The external display processors of the M4 Pro/Max (apple,t6041-dcpext,
desktop 26.6 IOMFB) announce no dcpav-service-epic, so the EDID read
through the DCPAV service never runs and every connector they drive has
an empty EDID. Userspace then names the monitor "Unknown".

The firmware still exports the TimingElements and DisplayAttributes of
each sink it drives, including the sink's ProductAttributes. Build the
base EDID block from them as the T8140 (H17P) external path already
does: enable the firmware metadata for the desktop external processors,
check the property extent and parse the sink identity from
DisplayAttributes, and read the IsPreferred, IsInterlaced, SyncPolarity
and PixelRepetition keys of each timing so the preferred timing can be
described. The published modes keep their flags; only the EDID's
detailed timing takes the polarity.

These processors have no cable generation of their own (their HDMI
output has no Type-C session), so count sinks instead: the first is
the one found at boot, and each cable attach or detach, Type-C route
change or HDMI unplug starts a new one, which an earlier sink's
metadata can never match. A firmware HPD loss alone does not drop it,
as the link can bounce without the sink being described again.

The H17P external, the other DCPs and the internal panels are
unchanged. The firmware 27 path of t6050/dcp gets its EDID through the
DCPAV service and its display product query only identifies an Apple
display, so there was nothing there to port to 26.6.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
(cherry picked from commit 221e2ac)
Brings the J616s batch5 kernel (the tree running on the M4 Pro) up to the
current integration/aurora, which adds #524 (J713 T8132 energy model), #526
(the T6041 display fabric carry, whose peer allocation field group batch5
already has) and #529 (J713 USB-C idle power).

Conflict resolution:
- selftests apple-dcp rate.py: keep batch5's version. Its fixtures follow
  #451's desktop adaptive sync and the T6041 external EDID. The
  integration/aurora side only changed how the lookup_mode() definition is
  found; its line-start pattern also matches the indented
  "lookup_mode(dcp, ..." call that batch5's iomfb.c has before the
  definition, while batch5's 'bool lookup_mode(' marker finds the
  definition in either form.

#529's ATC and dwc3 changes merge cleanly beside #516's two-lane DP pin D.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fixtures

#519 makes the CD321x update publish the DisplayPort mode the firmware
entered as a partner altmode, and drop it with the partner. The probe now
takes the connector from a "displayport" reference when the port has one.
The tipd host fixtures did not know either, so 24 of them stopped building.

- lifecycle: carry partner_altmode_dp and the DP mode VDO, and count
  partner altmode registration against removal.
- quiesce and the transaction fixtures built on it: carry
  partner_altmode_dp. They never enter DP on the partner, so the altmode
  helpers assert they are not reached.
- pm: report a "displayport" reference, which the probe fixtures already
  resolve, and assert the port-node fallback is not taken.

No assertion is relaxed. apple-dcp host selftests: 80/80.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants