Repository navigation
feat(nvidia): lit the chosen head once its link is ready - #523
Merged
Merged
Conversation
The light names both surfaces by their context DMAs, writes through the window channel's queue and the link set_up_output_link readies, and interlocks the core update with its window.
A head with neither an output table nor OCSC0 refuses a window's first image, and an unlit head's usage bounds forbid the table, so the light's methods write all three and set_up binds the table to the core channel.
Bring-up lights the head in one update interlocked with its window, or two when the first changes an owner or a window serves no head, a failed light taking the engine down. Modes past a head's raster are refused.
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
Bring-up stopped the head the boot firmware lit and trained the chosen monitor's link, then lit no head (the display engine's unit timing one monitor) in its place, so every monitor stayed dark.
Changes
build_head_light_methods(core_methods.h) gives, in NVIDIA's order, the core channel's methods (the register writes of the display channel that sets up heads and links) lighting a head with RGB at 8 bits a color: its raster and pixel clock, its control written whole, the serial link (NVIDIA's SOR) carrying it alone in DisplayPort on the display id's sublink, the display id and an unscaled viewport the size of the mode. Each method is re-declared in rm.h from NVIDIA's core channel class.display_enginekeeps the context DMAs (the handles a channel names a surface by) of the base buffer and the look-up table surface, binds the table to the core channel too, whose heads read their output table from it, and keeps the window channel's queue of methods.set_up_output_link(display_link.h) hands back the output resource and link it readied.set_upwrites the head's methods, the window's usage bounds (build_window_usage_methods) and, into the window's channel, its first image (the base buffer through the look-up table, frombuild_window_image_methods), then one core update naming the completion notifier and interlocked with the window channel's update. It waits for the notifier and logs the lit head's display id and link control as the core channel's armed state reads them.choose_first_light(display_light.h) refuses a mode whose totals pass 32,767 pixels or lines, the largest raster a head takes, without asking the bandwidth check (the firmware's check that the display engine can fetch a mode), as NVIDIA's mode validation refuses it, and logs it.edid::timingholds, where NVIDIA's mode timings hold 16-bit totals, so a total past 65,535 is refused rather than cut.set_upreads back the light's completion notifier and the lit head's display id and link control alone, not the head's output table and OCSC0 controls, the window's CSC0 and CSC1 controls (its color space conversions), the link status over AUX (DisplayPort's side channel) after the update or the base buffer through BAR1 (the card's window onto video memory).build_window_image_methodsdrafted ahead of them, and fix(nvidia): logged the display set-up's counts of 1 in the singular #521) lit head 0 over DisplayPort on both boot paths, the card's own display (run land-light5-card-4) and QEMU's VGA (land-light5-vga-4). Each read the light's completion notifier finished and head 0's display id 0x100 in the armed state, with no Xid (NVIDIA's error report) or error-log event from the GSP (the card's firmware processor) after window 0's first image and 0 IOMMU or PCIe faults.nvidia_core_methodschecks head 0's methods at 2560 by 1440 against NVIDIA's, method for method and value for value, that they follow the head, link and windows given, bound no window for a head serving none and take each negative sync, that a window's usage methods bound its formats, scale factor and fetch, and that the raster keeps 15 bits of each position, the pixel clock 31 bits of its hertz and a window's fetch bound 15 bits of its pixels.nvidia_display_enginechecks the light in one update interlocked with its window, in two when the first update changes a window's owner or a present window serves no head, in one first update doing neither, the lit head taken down with its link after a failed light and alone after a failed first light, no light after a refused stream, the surfaces' bindings, a look-up table surface it cannot unbind from the core channel included, and the window channel's queue, which the release drops.nvidia_display_lightchecks the output table's identity entries and the raster refusal, with a total whose low 16 bits would pass, and that refusing every mode leaves the choice unchanged.