Cog wpebackend fdo fixes - #143
Open
mirko wants to merge 2 commits into
Open
Conversation
mirko
force-pushed
the
cog-wpebackend-fdo-fixes
branch
from
July 18, 2026 21:54
bfae2d6 to
207eff1
Compare
Six upstream-ready patches against 0.18.5 (developed and verified on a Dell Wyse 5010: radeon PALM/DCE4.1, both llvmpipe/SHM and r600/dmabuf paths): - 001: cold-start initialization. CRTC selection required an existing encoder binding (none exists without a prior fbcon/firmware modeset), kms_screen_create crashed on modeless connectors, init_cursor used the possibly-dead screens[0]. The incomplete display setup from the old CRTC selection is also what left DCE4.1's cursor fetch uninitialized - initially misdiagnosed as a hardware/kernel bug. - 002: SHM exported-buffer handling. Root cause of a crash family: the renderer stored itself in the buffer resource's user_data, which for SHM buffers IS libwayland's wl_shm_buffer - from the second attach on, wl_shm_buffer_get() returned the renderer as buffer metadata. Plus early buffer release (avoids deferred pool-resize stale mappings) and copy hardening. - 003: legacy hardware cursor (drmModeSetCursor) for non-atomic drivers without a universal cursor plane, with correct 64x64 tightly-packed premultiplied cursor image. - 004: software cursor option (COG_PLATFORM_DRM_CURSOR=sw), composited into SHM frames with in-place motion updates; dmabuf-safe. - 005: cursor.x/y are unsigned, so the existing 'if (cursor.x < 0)' lower clamp was dead code; moving past the top/left edge wrapped the position around and the upper clamp teleported the cursor to the opposite edge. Clamp in floating point before the unsigned store. Present upstream (master) as well. - 006: scale the 16x16 cursor artwork by the view's device scale factor (nearest neighbour; up to 4x within the 64x64 hardware cursor buffer, same factor for the modeset renderer's software cursor), so the pointer keeps its apparent size next to a --device-scale'd UI. Makefile: pin the complete meson option set of 0.18.5 (platforms drm/headless/wayland, wpe_api 2.0, libmanette, plugin path). PKG_RELEASE 9. Patchset already proposed upstream: Igalia/cog#794 Assisted-By: Claude Fable + Opus Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
Surface::shmBuffer/dmabufBuffer were set at attach and never cleared; a commit without a fresh attach (frame-callback pacing) re-exported the previous - potentially dangling - buffer pointer, handing the embedder garbage buffer metadata. Consume the attached state at commit and export nothing without a buffer, in both ImplSHM and ImplEGL (upstream-ready patch with the full story). PKG_RELEASE 5. Patchset already proposed upstream: Igalia/WPEBackend-fdo#206 Assisted-By: Claude Opus + Fable Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
mirko
force-pushed
the
cog-wpebackend-fdo-fixes
branch
from
July 18, 2026 22:07
207eff1 to
7843302
Compare
Member
|
CI/CD is failing: |
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.
No description provided.