xup/capture: add dma-buf transport for A2 updates - #424
Open
FlyGoat wants to merge 2 commits into
Open
Conversation
Replace the open-coded xup message, order, metadata, capability, and client-data IDs in rdpClientCon.c with the existing symbolic protocol definitions. This is a mechanical cleanup with no intended behavior change, but it makes the on-wire protocol handling easier to follow and less error-prone. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
When the client advertises XUP_CAPTURE_TRANSPORT_DMABUF and glamor can export pixmaps, prepare per-monitor dma-buf-backed surfaces, capture into them, and send the fd plus buffer metadata to xrdp instead of using the shmfd path. Hook this up for the SUF_A2 and GFX_A2 capture modes, refresh the exported surfaces after client-info and monitor-layout changes, and keep accel assist disabled while dma-buf transport is in use. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
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.
This is the xorgxrdp side of the matching dma-buf transport series for neutrinolabs/xrdp#3774.
The first commit is protocol cleanup:
rdpClientCon.cwith the shared symbolic definitionsThe second commit adds dma-buf transport for A2 capture:
XUP_CAPTURE_TRANSPORT_DMABUF, the capture mode isCC_SUF_A2orCC_GFX_A2, glamor is active, and pixmap import/export is supportedglamor_shareable_fd_from_pixmap()and keep the associated width, height, stride, fourcc, and size metadatardpCaptureSufA2()andrdpCaptureGfxA2(), copy the dirty regions into the per-monitor dma-buf pixmaps, setXRDP_ENC_SOURCE_DMABUF, and skip the old shmfd payloadXUP_ORDER_PAINT_RECT_DMABUFandXUP_ORDER_EGFX_DMABUFwith the dma-buf fd plus surface metadata instead of using only the*_SHMFDordersWith the matching xrdp changes, this lets A2 updates be encoded from imported dma-buf surfaces instead of requiring a round-trip through shared system memory.
This is working for me with the matching xrdp series on Intel xe.