Skip to content

feat(nvidia): found the chosen output's DisplayPort link and its facts - #516

Merged
FlareCoding merged 1 commit into
pr/nvidia-shutdown-updatefrom
pr/nvidia-link-assignment
Oct 29, 2026
Merged

FlareCoding merged 1 commit into
pr/nvidia-shutdown-updatefrom
pr/nvidia-link-assignment

Conversation

@FlareCoding

Copy link
Copy Markdown
Owner

Summary

Before the chosen output's link can be trained, bring-up must know which output resource and link drive its display id and what the resource's links support, so inside the mode set it has the display id assigned a resource as NVIDIA's modesetting module does and reads the resource's DisplayPort facts.

Changes

  • Assigns the display id a resource through the crossbar: on a GPU whose display common reports a crossbar, assign_output_link (display_link.h, display_link.cpp) sends NVIDIA's DFP_ASSIGN_SOR (re-declared in rm.h) for the display id and takes the last resource whose entry in the reply drives the display id on its own or as the primary of two output resources fed by two heads, as the modesetting module reads the reply.
  • Finds the resource and link driving the display id: assign_output_link reads the display id's output resource facts and takes the link their protocol names, A or B. Without a crossbar, the resource is the one those facts name, which must be a serial one display common can assign.
  • Reads what the resource's links support: read_link_capabilities sends DP_GET_CAPS for the resource and counts FEC support, the increased watermark limits and PHY repeater training as set only when their bytes are 1, NVIDIA's NV_TRUE. link_rate_of_code (display_outputs.h, display_outputs.cpp) reads the highest rate code with the table that reads a display id's link rate code, a code NVIDIA defines no rate for counting as RBR.
  • Bring-up finds the chosen output's link inside the mode set: once the shutdown update is read, or with no head active, display_engine's bring-up calls set_up_output_link and logs the resource, its link and its facts. A refused assignment or resource facts request, or an answer naming no serial resource driving DisplayPort, logs one error line ending in "so the link's DisplayPort facts are not read", and a refused DisplayPort facts request logs its own.
  • A link not set up takes the display engine down: after such a stop, bring-up logs that the link is not set up and takes the engine down as after a failed shutdown update, then ends the mode set, the set-up returning OK. A request failing other than by display common's refusal, such as one whose reply never arrives, fails the set-up with its error after the take-down and the end.
  • Departure: a refused DP_GET_CAPS stops the link, where NVIDIA's library asserts and goes on with the facts it held before the request, facts nothing in its code gives a default.
  • Card: on the RTX 3080 driving an IOC 25G2S monitor over DisplayPort, runs land-link-move-c1-a1 (QEMU's display as the boot display, no head active) and land-link-move-c1-b1 (the card's own boot display, its head stopped by the shutdown update first), boots of 185ed634, an earlier version whose kernel, stripped of debug information, is byte-identical to this commit's, logged nvidia: display id 0x100 is driven by output resource 0 through its link B, as display common assigned it and nvidia: output resource 0's DisplayPort links run up to DisplayPort rate 0x1E, support FEC, take the increased watermark limits and support DisplayPort 1.2, and the firmware trains PHY repeaters between the mode set's start and end, with no take-down, then ended bring-up with the driver attached, with 0 IOMMU or PCIe faults on the host. No head drives the link before the driver lights an output of its own, so the monitor shows no picture; the screen was not captured.
  • Tests: nvidia_display_link checks the assignment, resource facts and DisplayPort facts requests in NVIDIA's layouts, each zeroed but for what it sends though an earlier call left its frame dirty, the resource taken on its own or as the primary and none for a secondary or missing one or a refusal, the last of two entries naming the display id taken, the index taken from the output resource facts without a crossbar, each resource type, index and protocol refused and logged with its values, a crossbar reply naming no resource and a refused resource facts request logged with what they skip, none of these refusals logging a link, an error other than a refusal passed on for both facts requests, the facts' bytes counted only at 1 (0x81 and 0xFF counting as clear), DisplayPort 1.2 read from the versions' bit 0 alone, every highest rate code including one with bit 3 set, and the facts left unread on a refusal. nvidia_display_engine checks that after the shutdown update a set-up reads the chosen output's resource facts and then the resource's DisplayPort facts, once each and before the mode set's end, logging both and taking nothing down; that with a crossbar it takes the resource and link the assignment names; that a refused assignment, or a refused or late DisplayPort facts request, takes the engine down and ends the mode set, a late one failing the set-up with its error; and that a set-up without a base buffer asks for neither.

A refused assignment or facts request leaves the link not set up, and
bring-up then takes the display engine down before the mode set's end. A
request failing otherwise fails `set_up` with its error after both.
@cursor

cursor Bot commented Oct 29, 2026

Copy link
Copy Markdown

Current version of PR was reviewed by /review-bugbot with additional instructions on Oct 29, 14:11. It flagged 0 findings.

Bugbot on commit b013da0 is skipped.

@FlareCoding
FlareCoding added this pull request to stack #519 October 29, 2026 17:48
@FlareCoding
FlareCoding merged commit 9a91e20 into master Oct 29, 2026
11 checks passed
@FlareCoding
FlareCoding deleted the pr/nvidia-link-assignment branch October 29, 2026 17:49
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.

1 participant