aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorVincent Vanlaer <vincent.vanlaer@skynet.be>2019-02-15 15:59:09 +0100
committerVincent Vanlaer <vincent.vanlaer@skynet.be>2019-02-15 15:59:09 +0100
commit26a9fa81488a10f637d066c1ffabf1b780a0e48a (patch)
tree7052287d76826eccd0b7a8be6e70def8f7645b96 /backend/drm
parentbc048b22fb3158e9ecad3e8e32d63e0e03eaa7bb (diff)
Add workaround for hardware cursors on nouveau
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 7713b5bb..a2a733f5 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -729,6 +729,15 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
bo = copy_drm_surface_mgpu(&plane->mgpu_surf, plane->surf.back);
}
+ if (bo) {
+ // workaround for nouveau
+ // Buffers created with GBM_BO_USER_LINEAR are placed in NOUVEAU_GEM_DOMAIN_GART.
+ // When the bo is attached to the cursor plane it is moved to NOUVEAU_GEM_DOMAIN_VRAM.
+ // However, this does not wait for the render operations to complete, leaving an empty surface.
+ // see https://bugs.freedesktop.org/show_bug.cgi?id=109631
+ // The render operations can be waited for using:
+ glFinish();
+ }
bool ok = drm->iface->crtc_set_cursor(drm, crtc, bo);
if (ok) {
wlr_output_update_needs_swap(output);