Conversation
Check the reported byte count before copying into the fixed-size reply buffer. MST remote I2C replies can advertise up to 255 bytes, while the buffer holds 128.
sbmf21
marked this pull request as ready for review
September 26, 2026 11:45
Route supported I2C transfers through NVKMS to DisplayPort remote I2C sideband requests. Register DPMST adapters per connector and refresh display handles on connector reuse. Reject unsupported requests and short replies. Post transfers asynchronously and wait outside the global NVKMS and PM locks so DDC response delays do not stall compositor updates. Use request tokens and explicit cancellation to handle completion, errors and teardown. Keep the feature opt-in with mst_ddc=1 pending broader hardware testing.
sbmf21
force-pushed
the
fix/mst-ddc-upstream
branch
from
September 27, 2026 16:43
c037880 to
5b0ad91
Compare
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.
An MST chain can expose the physical connector's legacy I2C path without exposing per-display I2C adapters for downstream sinks. DDC/CI clients such as ddcutil and KDE PowerDevil then cannot address each monitor independently.
This series adds opt-in per-connector MST DDC adapters, enabled with
nvidia_drm.mst_ddc=1. Transfers are routed through NVKMS to the existing DisplayPort remote I2C sideband implementation. Supported requests are a single read, a single write, or a combined write/read preserving the repeated START. Unsupported message shapes, flags and lengths are rejected; transport failures and short replies return an error.MST messages are posted asynchronously. KAPI waits outside the global NVKMS and PM locks, with separate start, poll and cancel operations. Requests are owned by the DP device and identified by unique tokens; callbacks detach messages on completion/failure, and timeout/error paths cancel outstanding requests. This prevents monitor reply delays from blocking compositor display updates.
Adapters use the established
DPMSTname and are associated with their DRM connectors. This lets existing ddcutil phantom detection exclude a duplicate legacy path. The adapter's display handle is refreshed when a connector is reused, and adapter registration is unwound on failure/destruction. The separate DisplayPort prerequisite commit bounds the reported remote I2C reply length before copying into the fixed 128-byte buffer.Validation
Remaining validation and hotplug limitation
Suspend/resume passed on the earlier synchronous revision; it has not yet been repeated with the asynchronous implementation.
On that earlier revision, disconnecting/reconnecting the GPU-to-root-monitor cable left video blank across the chain. All three connectors remained connected/enabled and all nine brightness queries succeeded (three monitors, each tested with 40/200/1000 ms delays). KWin logged pageflip timeouts and NVIDIA logged
nvHandleCpEventDeferredWork: displayId ... invalid. Issue #1380 reports a similar error pattern on 615.71.09, but a shared cause or independence from this change has not been established. Cable hotplug has not yet been repeated with the asynchronous revision.Review is particularly welcome on NVKMS locking, connector reuse, request cancellation and adapter lifetime under concurrent hotplug/I2C activity. Other GPUs, MST hubs and older kernels remain untested, and the feature defaults to disabled.
Runtime testing used the feature code in this series plus a local KAPI version-string guard to prevent accidentally mixing stock and patched modules with the same release number. That packaging-only guard is excluded from this contribution.