Repository navigation
Conversation
When a compositor commits a refresh-rate-only mode change without attaching a buffer (such as labwc applying a wlr-output-management config), output_ensure_buffer() previously attached a freshly cleared solid-black empty buffer for the modeset. On simpledrm / ProMotion displays this blits a full black frame (~19 ms on J207) before the compositor repaints. Add patch 0004 to skip the empty buffer when an already-enabled output changes mode at the same resolution (without color-transform or image-description changes) and the backend test accepts the bufferless state. On the DRM backend, keep reuse restricted to per-output commits using a primary framebuffer from the current render-format swapchain (avoiding secondary-GPU untested probes and direct-scanout format/scaling hazards) and preserve explicit-sync release points until a new buffer replaces the reused framebuffer. Bump wlroots0.20 pkgrel to 3 (1:0.20.2-3). Assisted-by: LLM
Author
Before / After hardware verification (iPad Pro 10.5" J207,
|
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.
Problem
When a compositor commits a refresh-rate-only mode change without attaching a buffer (e.g.
labwcapplying awlr-output-managementconfiguration viawlr-randr),output_ensure_buffer()inwlrootsunconditionally attaches a newly cleared solid-black empty buffer for the modeset (Attaching empty buffer to output for modeset).On
simpledrm/ ProMotion displays (such as J207 switching between 60 Hz and 24 Hz for OrchardLinux/omarchy-a#298), this blits a full black frame (~19 ms measured directly on the physical scanout framebuffer) before the compositor paints the next frame, causing a visible black flicker on every refresh-rate transition.Change
Add
0004-output-reuse-front-buffer-on-same-resolution-modeset.patchtowlroots0.20and bumppkgrelto3(1:0.20.2-3):types/output/render.c(output_ensure_buffer()): On aWLR_OUTPUT_STATE_MODEcommit without a buffer, when no other state change requires a fresh buffer (ENABLED,RENDER_FORMAT, initial reconfiguration,COLOR_TRANSFORM, orIMAGE_DESCRIPTION), skip attaching an empty buffer if the output is already enabled at the samewidth x heightandoutput->impl->test(output, state)succeeds. Otherwise fall back to the existing empty-buffer path.backend/drm/drm.c(drm_connector_commit_state()): Restrict per-output bufferless modeset reuse on renderer-backed outputs to single-GPU commits whose current primary framebuffer belongs tooutput->swapchainwithswapchain->format.format == output->render_format(avoiding untested secondary-GPU probes, direct-scanout scaling/clock hazards, and 8-bit direct-scanout frames cappingmax_bpcon 10-bit outputs, without affecting device-widewlr_backend_test/commit).include/backend/drm/drm.h&backend/drm/drm.c: Trackqueued_fb_reusedonstruct wlr_drm_planeso explicit-sync release timelines on a reused framebuffer are preserved until a new buffer replaces it, while explicit same-buffer resubmissions still release normally.Verification
./tools/pkgrepo checkandpython3 -m unittest discover -s tests(37/37 OK).aarch64viaci/build-package arch wlroots0.20 aarch64 1:0.20.2-3.wlroots0.20 1:0.20.2-3on iPad Pro 10.5" (J207,simpledrm+labwc): cycled across 9 refresh-rate switches (24 / 30 / 48 / 60 / 120 Hz) plus90° -> normalrotation with zero visible black flickers and zero compositor errors.Assisted-by: LLM