[PR #11] [CLOSED] fix: workaround i915 modifier issue #15

Closed
opened 2026-10-15 12:47:30 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/gst-wayland-display/pull/11
Author: @DatCaptainHorse
Created: 6/5/2025
Status: ❌ Closed

Base: dev-dmabuf ← Head: fix/i915-modifier-workaround


📝 Commits (10+)

  • f40b6cd refactor: separated renderer from allocator and abstracted code
  • e159371 feat: implemented GBM+DMA buffer allocator
  • c481149 test: added test for buffer implementation
  • 4e3dd64 fix: properly render into DMA buffer
  • 86ab93d fix: export buffer as Gstreamer DmaBuf
  • 93d282e fix: correctly pass raw handles sizes to Gstreamer, support multiple planes
  • 90cda8b feat: abstracted out video info, passing the right format from caps negotiation
  • db8e389 feat: implemented Gstreamer caps negotiation with DMA formats and modifiers
  • 2d09cdd fix: properly expose all supported formats
  • 54c9517 fix: added Gstreamer buffer metadata

📊 Changes

18 files changed (+1199 additions, -474 deletions)

View changed files

📝 Cargo.lock (+142 -147)
📝 Cargo.toml (+2 -2)
📝 c-bindings/Cargo.toml (+1 -1)
📝 c-bindings/src/capi.rs (+1 -1)
📝 gst-plugin-wayland-display/Cargo.toml (+4 -2)
📝 gst-plugin-wayland-display/src/lib.rs (+1 -1)
📝 gst-plugin-wayland-display/src/waylandsrc/imp.rs (+234 -100)
📝 gst-plugin-wayland-display/src/waylandsrc/mod.rs (+1 -1)
📝 wayland-display-core/Cargo.toml (+5 -0)
📝 wayland-display-core/src/comp/mod.rs (+122 -107)
📝 wayland-display-core/src/comp/rendering.rs (+36 -70)
📝 wayland-display-core/src/lib.rs (+73 -21)
➕ wayland-display-core/src/utils/allocator/mod.rs (+472 -0)
📝 wayland-display-core/src/utils/mod.rs (+17 -0)
➕ wayland-display-core/src/utils/renderer/mod.rs (+52 -0)
➕ wayland-display-core/src/utils/video_info.rs (+34 -0)
📝 wayland-display-core/src/wayland/handlers/compositor.rs (+1 -21)
📝 wayland-display-core/src/wayland/protocols/wl_drm.rs (+1 -0)

📄 Description

There's an i915 modifier issue with gstreamer elements DMA-BUF support being kinda incomplete, which happens to show up in this project.

Basically they advertise taking in DRM modifiers which aren't supported by the device for sampling use, while waylanddisplaysrc can only push out such modifiers as the wayland compositor is rendered to a buffer with sampling flags.

I915_y_tiled and I915_4_tiled seem to have almost same internal format, atleast close enough to make the trick of falsely-advertising y-tiled modifier pads while actually using 4-tiled modifiers to work.

Tested down to Coffee Lake-S generation's UHD Graphics P630 iGPU, and up to Intel Arc Alchemist (DG2) dGPU.

Test pipeline: gst-launch-1.0 waylanddisplaysrc ! "video/x-raw(memory:DMABuf),width=1920,height=1080,framerate=60/1" ! vapostproc ! vah264enc ! fakesink (or vah264lpenc as newer platforms may only support low-power encoding)

qsv encoders also seem to work just fine in-place of va ones in above pipeline 👍


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/gst-wayland-display/pull/11 **Author:** [@DatCaptainHorse](https://github.com/DatCaptainHorse) **Created:** 6/5/2025 **Status:** ❌ Closed **Base:** `dev-dmabuf` ← **Head:** `fix/i915-modifier-workaround` --- ### 📝 Commits (10+) - [`f40b6cd`](https://github.com/games-on-whales/gst-wayland-display/commit/f40b6cd055a98360a4c190f06359e84b1de2ee35) refactor: separated renderer from allocator and abstracted code - [`e159371`](https://github.com/games-on-whales/gst-wayland-display/commit/e1593716fedc995155329818957c3712ece7c6bb) feat: implemented GBM+DMA buffer allocator - [`c481149`](https://github.com/games-on-whales/gst-wayland-display/commit/c4811490edc4edb94d651bc2b0a22497aa527a28) test: added test for buffer implementation - [`4e3dd64`](https://github.com/games-on-whales/gst-wayland-display/commit/4e3dd64e45e2579529292e77e03a58fa5ca15e88) fix: properly render into DMA buffer - [`86ab93d`](https://github.com/games-on-whales/gst-wayland-display/commit/86ab93d4b9464013baefd0ce7f3b1e0fccc2aac4) fix: export buffer as Gstreamer DmaBuf - [`93d282e`](https://github.com/games-on-whales/gst-wayland-display/commit/93d282ec58942fccbdca4e51f3a9c35b1823a999) fix: correctly pass raw handles sizes to Gstreamer, support multiple planes - [`90cda8b`](https://github.com/games-on-whales/gst-wayland-display/commit/90cda8b9f1956390eb44f51a87dd2e4cde71c4a1) feat: abstracted out video info, passing the right format from caps negotiation - [`db8e389`](https://github.com/games-on-whales/gst-wayland-display/commit/db8e3891860cb9e78300a06ace5319f83f5c7cb6) feat: implemented Gstreamer caps negotiation with DMA formats and modifiers - [`2d09cdd`](https://github.com/games-on-whales/gst-wayland-display/commit/2d09cddc964c1b7dc3cdb36804b038ade7836fa0) fix: properly expose all supported formats - [`54c9517`](https://github.com/games-on-whales/gst-wayland-display/commit/54c951720e94119d37e920c5bc5660dfca3bf79e) fix: added Gstreamer buffer metadata ### 📊 Changes **18 files changed** (+1199 additions, -474 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+142 -147) 📝 `Cargo.toml` (+2 -2) 📝 `c-bindings/Cargo.toml` (+1 -1) 📝 `c-bindings/src/capi.rs` (+1 -1) 📝 `gst-plugin-wayland-display/Cargo.toml` (+4 -2) 📝 `gst-plugin-wayland-display/src/lib.rs` (+1 -1) 📝 `gst-plugin-wayland-display/src/waylandsrc/imp.rs` (+234 -100) 📝 `gst-plugin-wayland-display/src/waylandsrc/mod.rs` (+1 -1) 📝 `wayland-display-core/Cargo.toml` (+5 -0) 📝 `wayland-display-core/src/comp/mod.rs` (+122 -107) 📝 `wayland-display-core/src/comp/rendering.rs` (+36 -70) 📝 `wayland-display-core/src/lib.rs` (+73 -21) ➕ `wayland-display-core/src/utils/allocator/mod.rs` (+472 -0) 📝 `wayland-display-core/src/utils/mod.rs` (+17 -0) ➕ `wayland-display-core/src/utils/renderer/mod.rs` (+52 -0) ➕ `wayland-display-core/src/utils/video_info.rs` (+34 -0) 📝 `wayland-display-core/src/wayland/handlers/compositor.rs` (+1 -21) 📝 `wayland-display-core/src/wayland/protocols/wl_drm.rs` (+1 -0) </details> ### 📄 Description There's an i915 modifier issue with gstreamer elements DMA-BUF support being kinda incomplete, which happens to show up in this project. Basically they advertise taking in DRM modifiers which aren't supported by the device for sampling use, while `waylanddisplaysrc` can only push out such modifiers as the wayland compositor is rendered to a buffer with sampling flags. `I915_y_tiled` and `I915_4_tiled` seem to have almost same internal format, atleast close enough to make the trick of falsely-advertising y-tiled modifier pads while actually using 4-tiled modifiers to work. Tested down to Coffee Lake-S generation's UHD Graphics P630 iGPU, and up to Intel Arc Alchemist (DG2) dGPU. Test pipeline: `gst-launch-1.0 waylanddisplaysrc ! "video/x-raw(memory:DMABuf),width=1920,height=1080,framerate=60/1" ! vapostproc ! vah264enc ! fakesink` (or `vah264lpenc` as newer platforms may only support low-power encoding) `qsv` encoders also seem to work just fine in-place of `va` ones in above pipeline :+1: --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:47:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/gst-wayland-display#15
No description provided.