https://bugs.kde.org/show_bug.cgi?id=529044

            Bug ID: 529044
           Summary: All overlays are dropped every frame when one
                    candidate can't be prepared for direct scanout
    Classification: Plasma
           Product: kwin
      Version First git master
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: compositing
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

STEPS TO REPRODUCE
1. Run KWin Wayland with overlays enabled (KWIN_USE_OVERLAYS=1) on AMD
   (tested on Strix Point / DCN 3.5, 1920x1080@60).
2. Play a 1080p video in Firefox in a normal window, so that the video
   subsurface is scanned out on an overlay plane.
3. Resize the Firefox window.

OBSERVED RESULT
While resizing, Firefox redraws its web content subsurface every frame, so it
becomes a layer candidate. Its buffer uses a modifier that the overlay plane
doesn't support, so prepareDirectScanout() fails for it. composite() then
falls back to compositing everything except the cursor, which also moves the
video off its overlay plane, although the video itself can be scanned out.
As the web content is only a candidate part of the time, the video is moved
between the overlay plane and composition repeatedly. On amdgpu every plane
enable/disable is a full display update, (see drm/amd#4358), so the resize
sometimes visibly stutters, mostly at its start.

With a window resized by a KWin script for 30s there is about 19 % of the
commits
missed the next vblank.

EXPECTED RESULT
Only the item that can't be scanned out is composited; the other candidates,
like the video, stay on their planes.

SOFTWARE/OS VERSIONS
KWin: git master (also reproduced on 6.8.2)
Linux: 7.3.0-rc4 (drm-misc-next)
Firefox: 162
Mesa: 26.2.4-arch1.1

ADDITIONAL INFORMATION
This is different from bug 523754 (the client reallocating buffers after
dmabuf feedback) and from the plane update cost itself (bug 511423): KWin
drops every overlay because one unrelated candidate can't be scanned out,
which also happens when nothing is being reallocated.

Patch will follow as a merge request.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to