Repository navigation
Conversation
Firmware 27 internal panels publish MinimumVariableRefreshRate and MaximumVariableRefreshRate as zero placeholders in their timing catalog, just like desktop 26.6 firmware. Enable zero_vrr_range_fallback for DCP_FIRMWARE_V_27_0 so eDP panels with ProMotion timings advertise their 24-120 Hz VRR range, and allow VRR_ENABLED transitions on firmware 27 panels to trigger iomfb_modeset() so parameter 15 is programmed. If a firmware 27 panel refuses parameter 15, record the refusal on the modeset wait cookie, warn once, and still issue set_digital_out_mode() so the panel keeps fixed refresh instead of blanking. Mark the boot-mode inheritance path as refusing VRR so dcp->vrr_enabled never claims adaptive sync is active when parameter 15 was skipped. Extend parser_vrr_empty_range in parser-test.c to verify DCP_FIRMWARE_V_27_0 enables the fallback on eDP and leaves external DisplayPort timings fixed. Signed-off-by: Erik Bourget <erik@ebourget.net>
There was a problem hiding this comment.
The internal-panel refusal path does not distinguish a rejected enable from a rejected disable. It proceeds with the ordinary mode set and records vrr_enabled=false in both cases. If parameter 15 is refused while previously armed, the reply does not prove the panel actually left adaptive sync. Please handle rejected disable without claiming fixed refresh until it is confirmed, or document and demonstrate that the following mode-set call clears it. Add a transition test starting with VRR enabled, and retain the fixed-60-Hz and affected ProMotion peer rows.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
Distinguish a rejected adaptive-sync enable on a fixed internal panel from a refusal while adaptive sync is already armed. When dcp->vrr_enabled was false, firmware 27 panels still fall back to set_digital_out_mode() at fixed refresh so the display stays lit. When dcp->vrr_enabled was already true (including disabling adaptive sync), a parameter-15 refusal fails the modeset with -EOPNOTSUPP instead of proceeding and claiming fixed refresh without confirmation. Avoid touching cookie fields inside the display-sleep-merge host test slice by tracking whether adaptive sync was sent in iomfb_modeset(), and update the apple-dcp host selftests for dcp->vrr_capable and the VRR-armed refusal/disarm transition. Signed-off-by: Erik Bourget <erik@ebourget.net>
When a property-only VRR_ENABLED change on firmware 27 refuses parameter 15 without calling set_digital_out_mode(), the active pipe timing and confirmed VRR state remain intact in firmware. Do not clear dcp->mode_state.valid in dcp_crtc_atomic_modeset() on that refusal, so subsequent plane-only flips continue to submit instead of being dropped in iomfb_atomic_start(). Extend the apple-dcp vrr-refusal host test to execute dcp_crtc_atomic_modeset() and iomfb_atomic_start() through subsequent plane-only flips, concurrent invalidation, timing changes, and external displays. Signed-off-by: Erik Bourget <erik@ebourget.net>
Have dcp_mode_begin() capture and return prior validity under state->lock before clearing invalidated, so dcp_crtc_atomic_modeset() never relies on an unlocked read that misses an invalidation between admission and begin and mistakenly restores stale timing on a refused VRR change. Update iomfb-state-test and the apple-dcp vrr-refusal selftest to cover invalidation before dcp_mode_begin(). Separate V27 wake readiness from keep_mode in iomfb_modeset() so renumbered firmware still waits for v27_wake_video and v27_wake_hotplug before programming parameter 15 when VRR is enabled after wake, and add the vrr-wake-readiness host selftest. Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Fixed in
Verified at
Hardware at |
There was a problem hiding this comment.
The refusal branch now keeps the confirmed active VRR state and skips the timing change. Mode validity is captured under the lock and the tests cover invalidation and later plane-only flips. Code approved. J716c real wake and refusal/continued-scanout validation, a ProMotion peer, and hosted checks remain landing evidence.
dcp_modes_begin_attachment(), dcp_modes_end_typec(), dcp_modes_adopt(), dcp_modes_replace(), and dcp_modes_release() in iomfb.c now update dcp->vrr_capable. Add bool vrr_capable to struct apple_dcp in rate.py so publication-hpd and panel-dimensions compile. Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Fixed the failing
Verified after
|
There was a problem hiding this comment.
Verdict: MERGE at 9a9aa2466f43
Blockers: Existing live J716c wake, refused-change continued scanout, peer and hosted validation remain due.
Checked: The only delta adds the field read by production code to the rate mock. Production behavior is byte-identical to the reviewed parent. The author reports five rate cases passed.
Evidence
Compared the current head, prior review and current PR receipts.
Signed-off-by: Erik Bourget <erik@ebourget.net>
… refusal mock The vrr-refusal host test extracts struct dcp_mode_state from iomfb-state.h and dcp_crtc_atomic_modeset() from iomfb.c. On current main the state header carries dcp_provider_clock_limits(), which uses u64, and the M4 branch of dcp_crtc_atomic_modeset() calls dcp_notch_mode_known(), so the generated unit no longer compiles. Declare u64 and add an asserting dcp_notch_mode_known() stub next to the existing iomfb_m4_get_mode() one; the test never takes the M4 branch. Signed-off-by: Erik Bourget <erik@ebourget.net>
|
Merged current
Verified at
Still open (unchanged by this push): a J716c row at the new head, a VRR mode set after a real |
There was a problem hiding this comment.
Verdict: MERGE at 3c86dfd
Checked: The forward merge keeps the VRR refusal fixture. The two declarations added by the follow-up match the newly included header and keep the test's unexpected notch path asserting. The intended VRR refusal behavior remains.
Remaining validation: Carry the open J716c wake, refused-change scanout and peer evidence, plus exact-head CI.
|
Closing as superseded by #3616 (merged). #3616 reports firmware-27 ProMotion panels as |
What: Enable 24–120 Hz ProMotion adaptive sync on firmware-27 internal panels by allowing zero VRR range placeholders on
DCP_FIRMWARE_V_27_0eDP timings, allowingVRR_ENABLEDatomic property transitions on VRR-capable (or currently VRR-armed) firmware-27 pipes to program parameter 15, keeping active VRR state when parameter 15 is refused while armed (falling back to fixed refresh on an initial enable refusal), preserving valid scanout timing across refused property-only VRR changes while atomically capturing prior validity underdcp->mode_state.lock, keeping the renumbered firmware wake readiness waits ahead of parameter-15 reprogramming, and addingvrr_capableto therate.pyhost test mockstruct apple_dcp.Tested: At
9a9aa2466f43(drivers/byte-identical to7bd9598400bf):checkpatch --strict,apple-dcprate(5/5),vrr-rejection,vrr-refusal,vrr-wake-readiness, anddisplay-sleep-merge-tests.py(17/17) pass locally (9a9aa2466f43rate.pymock fix still needs hosted CI); at7bd9598400bf: arm64 QEMU KUnitdisplay.kunitconfig(167/167non-skipped) and*iomfb-mode-state*(9/9) pass. Live J716c (16-inch M5 Max, T6050) in batched integration row3545ebecb76f(merges9a9aa2466f43with#3289'siomfb_v27_idle_cache_invalidate()iniomfb.c):eDP-1/vrr_rangeMin: 24 / Max: 120, VRR stayed on across 2xpm_test=platformcycles with an off/on transition after each, 3x DPMS off/on clean in the separate DPMS pass (threeIOAVVideoInterface open failedfirmware notices in kernel log), initial boot smoke snapshot clean (1failed system unitaurora-peripherals.service, same as baseline warm reboots; later checks recorded additional messages); no reals2idle/rtcwakeran on J716c. Prior runtime-identical7bd9598400bfrows (J716c VRR toggles +pm_test=devices; J713 non-VRR 60 Hz + 3xs2idle) pass in Evidence.Risk: two-way door · firmware-27 internal ProMotion panels (T6050 J716c, J714s/c, K114/K116); fixed 60 Hz panels (e.g. J815) and external displays stay fixed
Revert:
git revertthe merge commit onmainand rebuild/boot the kernel; no persistent disk, firmware, DT, or Stage 2 state is modified.Not yet: J716c VRR modeset after a real
s2idle/rtcwakedeep-sleep wake (onlypm_test=devicesandpm_test=platformsuspends ran on J716c, because the RTC alarm cannot wake J716c unattended; J713's wake rows are non-VRR), J716c refusal + continued scanout / plane-only flips after a refused parameter-15 VRR change (no refusal can be provoked cleanly on the VRR-capable J716c panel; covered byvrr-refusalhost scenarios), fixed 60 Hz firmware-27 panel (J815), non-J716c ProMotion boards (J714s/c,K114/K116; covered byparser_vrr_empty_rangeKUnit cases for FW 27 eDP 120 Hz, eDP 60 Hz, and external DisplayPort), and hosted CI (plus review) on9a9aa2466f43.Details
Five commits targeting
main:cf76f48cfd36(drm/apple: enable adaptive sync on firmware 27 internal panels):zero_vrr_range_fallbackforDCP_FIRMWARE_V_26_6_DESKTOP || DCP_FIRMWARE_V_27_0(eDP >= 119.88 Hz timings only) and removes thedcp_crtc_atomic_check()exclusion that prevented property-onlyVRR_ENABLEDtoggles from triggeringiomfb_modeset()on firmware-27 panels.dcp->vrr_capableacross the mode catalog lifecycle (dcp_modes_replace,dcp_modes_adopt,dcp_modes_begin_attachment,dcp_modes_end_typec,dcp_modes_release) so fixed panels never trigger a needless modeset onVRR_ENABLEDproperty commits.-EOPNOTSUPPon parameter-15 refusal for unpaired external displays and suppresseskeep_modewhen waking with VRR enabled so parameter 15 is reprogrammed after sleep.c2e745b2b2e1(drm/apple: keep active VRR state when parameter 15 is refused):vrr_enableandvrr_was_enabledondcp_wait_cookieindcp_set_adaptive_sync()andvrr_sentlocally iniomfb_modeset().!wait->vrr_was_enabledon an internal panel, a parameter-15 refusal warns once, proceeds withdcp_set_digital_out_mode()at fixed refresh so the panel stays lit, and keepsdcp->vrr_enabled = false.wait->vrr_was_enabledis true (including disabling adaptive sync withmin_vrr = 0or re-arming while active), a parameter-15 refusal logs a warning, returns-EOPNOTSUPPwithout callingdcp_set_digital_out_mode(), and keepsdcp->vrr_enabled = trueuntil a subsequent modeset confirms parameter 15 succeeded.tools/testing/selftests/drivers/gpu/apple-dcp/(transaction.pyfordcp->vrr_capable,lifecycle.pyvrr-rejectionfor firmware-27vrr_capable/vrr_enabledtransitions, and addsvrr-refusalcovering parameter-15 refusals starting with VRR enabled) and avoids touchingcookieinside thetools/asahi/display-sleep-merge-tests.pyslice.c29c1ac2f24c(drm/apple: keep valid timing on refused property-only VRR change):VRR_ENABLEDchanges indcp_crtc_atomic_modeset()(drivers/gpu/drm/apple/iomfb.c) whendcp->mode_state.validis already true and active state, connectors, timing (drm_mode_equal()), and color requests (dcp_color_request_equal(),pq_requested,output_edr) are unchanged.!reton property-only VRR changes and passes!ret || preserve_validtodcp_mode_finish()wheniomfb_modeset_v27()returns-EOPNOTSUPPwithout tearing down a paired display, keepingdcp->mode_state.validvalid (unless invalidated concurrently) so subsequent plane-only flips continue to submit iniomfb_atomic_start()with the confirmeddcp->vrr_enabledstate.vrr-refusalintools/testing/selftests/drivers/gpu/apple-dcp/lifecycle.pyto executedcp_crtc_atomic_modeset()andiomfb_atomic_start()across subsequent plane-only flips, concurrent invalidation, timing changes, and external displays.7bd9598400bf(drm/apple: close mode-state begin race and keep wake readiness on VRR):dcp_mode_begin()(drivers/gpu/drm/apple/iomfb-state.h) to capture and return the priorstate->validunderstate->lockbefore clearinginvalidated, and movesdcp_crtc_prepare_hdr()indcp_crtc_atomic_modeset()(drivers/gpu/drm/apple/iomfb.c) afterdcp_mode_begin()so an invalidation beforedcp_mode_begin()cannot be masked by a stale unlockedwas_validread or restored by a refused property-only VRR change.wake_readyfromkeep_modeiniomfb_modeset()(drivers/gpu/drm/apple/iomfb_template.c) so a renumbered-firmware (27.2) wake still waits forv27_wake_video, and then forv27_wake_hotplugonly once the panel's video interface has opened (drivers/gpu/drm/apple/iomfb_template.c:4417), before programming parameter 15 when waking with VRR enabled; a video-open timeout only warns and parameter 15 still proceeds.iomfb-state-test.c(dcp_mode_invalidation_order_test) andvrr-refusal(9 scenarios, adding invalidation beforedcp_mode_begin()), and addsvrr-wake-readiness(7 scenarios) totools/testing/selftests/drivers/gpu/apple-dcp/lifecycle.pyandrun.py.9a9aa2466f43(selftests: apple-dcp: add vrr_capable to rate mock apple_dcp):bool vrr_capableto the mockstruct apple_dcpintools/testing/selftests/drivers/gpu/apple-dcp/rate.pysopublication-hpdandpanel-dimensionscompile against thedcp_modes_*helpers extracted fromdrivers/gpu/drm/apple/iomfb.c.Evidence
3545ebecb76f): J716c (16-inch M5 Max, T6050, firmware 27.2, AC, default command line) in a one-shot batched trial kernel (origin/mainb897ccb4e71cplus 18 open PR heads, commit3545ebecb76f): kernel image SHA-256d56efde4c7232208bd29d5c4e5890319e0050595dd4f4b1c3844df6656a08312, one-shot Stage 2 SHA-256b7d99286395ddd7dadccc6d9593f4bd55391d9e787af97c18b45f58688d9885d(default Stage 221edee972e1ff1718c6f41c32b91ee151afdc58cbb69f16f2f6a4d8d4c722170and default kernel untouched). Parity of#3399's 11 files in that tree: 3 blob-identical, 7 hunk-identical, 1 (drivers/gpu/drm/apple/iomfb.c) merged by hand with#3289(#3399'sdcp_crtc_prepare_hdr()/ VRR-only path kept,#3289'siomfb_v27_idle_cache_invalidate()added beforedcp_mode_begin()).eDP-1/vrr_range:Min: 24,Max: 120.pm_test=platformfreeze): VRR was enabled before the twopm_test=platformcycles (VRR=1 -> vrr: true), remained on after both (VRR after: vrr: trueafter cycle 1rc=0 success=5 fail=0and cycle 2rc=0 success=6 fail=0), and passed an off/on transition after each (VRR=0 -> vrr: false,VRR=1 -> vrr: trueafter cycle 1 and again after cycle 2, followed byVRR=0 -> vrr: false).vrr:1inset_digital_out_mode()(drivers/gpu/drm/apple/iomfb_template.c:4391) reports mode VRR capability (mode->vrr); adaptive-sync enable/disable requests are logged byIOMFBParameter_adaptive_sync Req minRR = 0x180000vs0x0.dpmsStatus: 0 drm_enabled=disabled, all four dcpextfControllerPowerState 0) and on (dpmsStatus: 1 drm_enabled=enabled),0new kernel warn/err lines during the DPMS helper window, while the full kernel log recorded three DCP firmware syslog notices (IOAVVideoInterface open failed, one per DPMS off->on cycle, followed byIOAVVideoInterface publishedand panel re-enable). No reals2idle/rtcwakewake with VRR active ran on J716c (the RTC alarm cannot wake J716c unattended).eDP-13456x2234@120 enabled; input Apple MTP keyboard, trackpad and SMC lid devices enumerated (not exercised remotely); networkingwlan0connected, 0% loss over 3 pings; permitted audio sinkAppleJ716+AppleJ716HPAIpresent withspeakerguarddv2 active (no playback outside thelinux#3085row); GPU BorealisApple M5 Max (G17C B1),renderD128,vkcube --c 180 --wsi waylandclean.1failed system unit (aurora-peripherals.service, same as baseline warm reboots;0new failed units),0failed user units,0LSM denials (no SELinux/AppArmor loaded),0Oops/BUG/fault lines; initial boot smoke snapshoterr+40lines against55on the default boot, none that the default boot lacks (apple-dcp ... unable to match service ...,systemd-gpt-auto-generator; later checks in the session recorded additional messages including the DPMS firmware notices,pm_testnotices, and a boot-time deprecated-workqueue warning). Redacteddmesgexcerpt:[ 1.250760] sn201202x 1-08: port controller ready;[ 2.677310] apple-ave 2283100000.video-encoder: firmware build 26B123 (TEXT 0x158000 CRC d33ed3b4, DATA 0x134000);[ 5.907044] apple-dcp 392e00000.dcp: RTKit: syslog message: ... fControllerPowerState 0 ...;[ 135.265810] PM: suspend entry (s2idle)/[ 140.691796] PM: suspend exit(pm_test=devices).9a9aa2466f43(git diff --quiet 7bd9598400bf..9a9aa2466f43 -- drivers/clean; built driver code byte-identical to7bd9598400bf; hosted CI still needed at9a9aa2466f43):git diff --check fcb124279183..HEAD: clean./scripts/checkpatch.pl --strict --git fcb124279183..HEAD: 0 errors / 0 warnings / 0 checks across all 5 commitspython3 -E -s -B tools/testing/selftests/drivers/gpu/apple-dcp/run.py --group rate: 5/5 passed (parser-policy,publication-hpd,panel-dimensions,metadata-decoder,bounded-retry)tools/testing/selftests/drivers/gpu/apple-dcp/lifecycle.py:vrr-rejection,vrr-refusal, andvrr-wake-readinesspassedpython3 tools/asahi/display-sleep-merge-tests.py: 17/17 passed7bd9598400bf(runtime-identicaldrivers/in9a9aa2466f43):./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/gpu/drm/apple/tests/display.kunitconfig: 168 run, 167 passed, 1 skipped (apple_g17_rx_util_min_testrequiresCONFIG_UCLAMP_TASK),apple-display-parser47/47 passed./tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 --kunitconfig=drivers/gpu/drm/apple/tests/display.kunitconfig --kconfig_add CONFIG_DRM_APPLE_KUNIT_TEST=y '*iomfb-mode-state*': 9/9 passed7bd9598400bf(byte-identicaldrivers/at9a9aa2466f43) in batched candidatec3da8eed6f72(overmain9af21b007425, default cmdline, default Stage 2, Linux 7.3.0, AC 100%):eDP-1/vrr_range:Min: 24,Max: 1200, 1, 0, 1, 0), ~118 ms each;minRR0x180000with VRR on,0x0with VRR offUnifiedPipeline::mode_set_gatedloggedVRR=YESandVRR=NOalternately,0errors; VRR toggled cleanly again after apm_test=devicesresume7bd9598400bf(byte-identicaldrivers/at9a9aa2466f43) in batched candidateb3dbf237542b(overmain9e38a276dcb4, default cmdline, default Stage 2, Linux 7.3.0):eDP-1/vrr_rangeMin: 0 / Max: 0,hyprctl monitorsvrr: false,set_digital_out_modeloggedvrr:0cleanly across modesets, 3x DPMS off/on and 3xs2idle(rtcwake -d /dev/rtc1 -m freeze -s 5) wake readiness,dpmsStatus=1on all 3 wakes.cf76f48cfd36:/sys/kernel/debug/dri/display-subsystem/eDP-1/vrr_range:Min: 24,Max: 120UnifiedPipeline::mode_set_gated:3456x2234@120 Hz DSC=NO VRR=YES link: 1<->VRR=NO link: 1(~114 ms)bl=150: 4,611 -> 4,552 mW (heatpipe 1,027 -> 987–991 mW);bl=1: 2,500 -> 2,425 mW (41.1 h)