nvkms: optional FRL training backoff, FRL caps retention, and lost-link retrain #1505
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1505"
general
weight: 0.35
starcraft66
Summary
Opt-in fixes for a failure chain on high-capability HDMI FRL displays (e.g. 7680x2160@120 with DSC) around display sleep/wake and sink power cycles. Both module parameters default off, so stock behavior is unchanged with no configuration.
1.
frl_train_backoff_ms(uint, default0): an optional delay in milliseconds between FRL link-training attempts. Some sinks take up to ~2 s after retraining before their SCDC accepts a new training request. The stock six attempts all run within a few milliseconds, so they all fail. With500, the six attempts span ~2.5 s and training succeeds.2.
frl_caps_retention(bool, defaultfalse): when a fresh FRL assessment fails (e.g. during wake) and the EDID is unchanged, keep the last successfully assessed FRL caps. FRL-only modes (e.g. 7680x2160) then stay in the connector mode list instead of being dropped, which would otherwise leave the display stuck on a lower mode.3. Retrain an active FRL link lost by the sink (only active with
frl_caps_retention): with retention keeping the mode list unchanged, a sink that is power-cycled while its head stays active loses its FRL link but gives the client nothing to react to. NVKMS detects this through SCDC and asks nvidia-drm to force a modeset of the head, which retrains the link.Background
Observed on an Odyssey G95NC (7680x2160@120, DSC) with 615.78.08 (the code paths involved,
nvDpyProbeMaxPixelClock(), thenvHdmiFrlSetConfig()retry loop andnvHdmiFrlAssessLink(), are unchanged in 620.70.06):linkMaxFRLRate = NONE.nvHdmiIsFrlPossible()then returns FALSE and the mode-list rebuild drops 7680x2160. The compositor's stored configuration is rejected and the display stays on a low-resolution fallback until the monitor is power-cycled.Design notes
retriesaccounting) with annvkms_usleepbetween attempts. The sleep is taken while the display lock is held; the parameter description documents this. When training fails with the parameter disabled, the existing "HDMI FRL link training failed" warning is followed by a hint naming the parameter.srcCaps/sinkCaps, the pixel-clock ceilings and a raw-EDID snapshot innvDpyProbeMaxPixelClock()before they are zeroed. It restores them at the three failure sites: probe SOR-assignment failure, probe assessment failure, andnvHdmiFrlAssessLinkfailure. The restore is conservative:- it only applies when the current caps are already reset;
- it is gated on the raw EDID bytes being unchanged;
- it sets
reassessFrlLinkCaps, so a real assessment overwrites the fallback.- After a retention restore in the SOR-assignment-failure branch, NVKMS reads SCDC Config_1 (FRL_Rate) and Status_Flags_0 (lane lock) for an active FRL head. It only reads SCDC and never writes or clears it.
- If the sink reports FRL_Rate 0 or no locked lanes, NVKMS sends a new kernel-client-only event,
NVKMS_EVENT_TYPE_DPY_LINK_RETRAIN_REQUIRED. The event is inNVKMS_USER_SPACE_DISALLOWED_EVENTS_MASK, and its payload is no larger than the existing union members, so the user-space ABI is unaffected.- nvidia-drm re-commits the connector's active CRTC with
mode_changedforced, from a work item, i915-style.- DRM
link-status= BAD was not used because Mutter does not handle it.- A healthy link reads FRL_Rate ≠ 0 with all lanes locked, so normal wakes don't trigger a retrain, and a successful retrain stops further triggers.
Validation
The branch is rebased onto
main(620.70.06). Field testing ran on 615.78.08, the version my distro ships, using the same three commits applied to the 615 tarball. The 620 rebase needed only mechanical changes; see the rebase comment below.7680x2160@119.997with the FRL mode retained. Without them, the mode is dropped and the monitor has to be power-cycled. A monitor firmware update was tested and didn't help; the ~2 s readiness window is on the sink side.0x31=0x34,0x40=0x5f), with no spurious retrains. The sink power-cycle case is not yet verified on hardware.Happy to split, reword, or change the option names/defaults if preferred.