Repository navigation
feat(nvidia): trained the chosen output's link and checked its training - #517
Merged
Merged
Conversation
A refused training, a refused status read or a status showing the link untrained leaves the link not set up, and bring-up then takes the display engine down before the mode set's end.
|
Current version of PR was reviewed by /review-bugbot with additional instructions on Oct 29, 14:11. It flagged 0 findings. Bugbot on commit |
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.
Summary
With the chosen output's link found and its DisplayPort facts read, bring-up trains the link at the lowest configuration that carries the chosen mode, as NVIDIA's DisplayPort library chooses it, and then makes its own check of the training against the link status the monitor and each PHY repeater (a retimer between the GPU and the monitor) report.
Changes
set_up_output_link(display_link.h, display_link.cpp) takes fromdisplayport::find_lowest_configurationthe lowest link configuration that carries the mode under the output's link facts, its connector's, its monitor's and the resource's, andtrain_linksends NVIDIA's DP_CTRL (re-declared in rm.h) setting the lane count and the rate, enhanced framing when the link runs it and PHY repeater training, as NVIDIA's library sets them. It trains each PHY repeater before the monitor when the resource's facts say the firmware trains them and the output's count of repeaters matches the onephy_repeater_countreads from the monitor's DPCD, as NVIDIA's library counts them, and the monitor alone otherwise.set_up_output_linkgives the configuration's search, the training and the check a copy of the DPCD without them, as NVIDIA's library then reads none.train_linkspins for the wait an accepted reply names, as NVIDIA's library waits after any reply, on the calling CPU since bring-up may run on a thread that cannot sleep.read_link_statusreads the lane status and alignment bytes from the monitor's link status indicators, or from its link status field when its DPCD revision or the GPU is below DisplayPort 1.2, and ANDs in each PHY repeater's, andset_up_output_linklogs whether the link's lanes are all trained, a link they show untrained counting as not set up.OK; a request failing other than by display common's refusal, such as one whose reply never arrives, fails the set-up after the take-down and the end.firmware::controlgives no refused request's reply.nvidia: display common trained display id 0x100's link at 1 lane at DisplayPort rate 0x1E (command 0x2083, 0 PHY repeaters trained first)andnvidia: display id 0x100's link status reads 0x07 0x00 0x01, so its 1 lane is trainedbetween 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 trained link before the driver lights an output of its own, so the monitor shows no picture; the screen was not captured.nvidia_display_linkchecks the training request with NVIDIA's command, each lane count in its data's low bits, each PHY repeater trained from the GPU's side before the monitor, each request zeroed but for what it sends though the one before left its frame dirty, only the monitor trained unless the firmware counts the repeaters, a refused training sent once and logged with its lanes, rate, command and data, an accepted reply's wait timed against the kernel's clock, the repeaters counted as NVIDIA counts them, an error other than a refusal passed on for the training and the status read, the status read with each repeater's bytes ANDed in, the monitor's own field below DisplayPort 1.2, and a refused status read giving no status.nvidia_display_enginechecks that a set-up trains the chosen output's link after reading its facts and then reads its status, once each, logging both; that the training follows the resource's DisplayPort facts where they differ from the chip table's (2 lanes at HBR2 under a lower highest rate, no configuration and no training under the lowest, no PHY repeater training when the firmware trains none, a repeater read under a chip table saying the firmware trains them left out of the configuration, the training and the check when the facts say it trains none, the monitor's own status field without DisplayPort 1.2); that under a chip table saying the firmware trains no PHY repeaters a repeater between the GPU and the monitor is not read, and the monitor alone is trained, with the repeater bit, and checked; that refused DisplayPort facts leave the link untrained, a refused training leaves its status unread and a training whose reply never arrives fails the set-up; that a status showing the link untrained is logged as such at 1 lane, with the engine taken down before the mode set's end, and at 2; and that a refused status read logs its line and no status line.