Skip to content

glamor/dri3: misc fixes for intel xe drm driver#423

Open
FlyGoat wants to merge 3 commits into
neutrinolabs:develfrom
FlyGoat:xe-misc-fixes
Open

glamor/dri3: misc fixes for intel xe drm driver#423
FlyGoat wants to merge 3 commits into
neutrinolabs:develfrom
FlyGoat:xe-misc-fixes

Conversation

@FlyGoat
Copy link
Copy Markdown

@FlyGoat FlyGoat commented Mar 26, 2026

While getting xorgxrdp working on xe, I hit a few issues in the glamor/DRI3 path.

This series:

  • backs the glamor screen pixmap with a GBM BO
  • authenticates DRI3 client fds when using a primary DRM node
  • switches the DRM version probe to libdrm helpers instead of a raw ioctl

With these patches applied, xorgxrdp works for me on xe.

FlyGoat added 3 commits March 26, 2026 18:51
Move screen backing allocation into shared RandR helpers, keep a software bounce buffer for CPU access, and create the glamor screen pixmap from a GBM BO.

GBM is available across all DRM drivers supported by xorgxrdp, so it provides a common allocation path for the glamor screen backing store.

Allocate the BO with GBM_BO_USE_SCANOUT as well as GBM_BO_USE_RENDERING. It appears GBM_BO_USE_SCANOUT is needed to keep the Intel xe driver happy, even though the BO is only used as the glamor screen backing store.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Render nodes do not require DRM authentication and report EACCES from drmGetMagic(), but primary nodes still need the client fd to be authenticated against the server DRM fd before it is returned to DRI3. Handle both cases in rdpDri3OpenClient() so client buffer sharing works regardless of which DRM node xorgxrdp is configured to use.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Use libdrm helpers to query the DRM device version instead of issuing DRM_IOCTL_VERSION directly during glamor device probing.

This keeps the existing detection logic while avoiding raw ioctl usage for better portability across DRM environments. Also open the DRM fd with O_CLOEXEC.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
@FlyGoat FlyGoat marked this pull request as ready for review March 26, 2026 18:59
@matt335672
Copy link
Copy Markdown
Member

@jsorg71 - I think this is your area to review rather than mine.

@FlyGoat - forgive my ignorance, but what is 'xe' in this context please?

@FlyGoat
Copy link
Copy Markdown
Author

FlyGoat commented Mar 26, 2026

@matt335672 Oops it's intel's new experimental drm driver.

@FlyGoat FlyGoat changed the title glamor/dri3: misc fixes for xe glamor/dri3: misc fixes for intel xe drm driver Mar 26, 2026
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.

2 participants