Skip to content

backend-drm: Clear drm_output cursor_view when view is destroyed

The DRM backend uses changes in the cursor view memory address and surface damage to detect when it needs to re-upload to a cursor plane framebuffer.

However, when a cursor view is destroyed and then recreated, e.g., when the pointer cursor surface is updated, the newly created view may have the same memory address as the just destroyed one. If no new cursor buffer is provided (because it was attached, committed and used previously) when this address reuse occurs, then there also isn't any updated surface damage and the backend doesn't update the cursor plane framebuffer at all.

To fix this issue, utilize the destroy signal to track when the cursor view is destroyed, and clear the cached cursor_view value in drm_output. After clearing the cached value, the next cursor view is always considered new and thus uploaded to the plane properly.

Signed-off-by: Alexandros Frantzis alexandros.frantzis@collabora.com

Merge request reports