diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-02-15 16:07:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-15 16:07:50 +0100 |
commit | 2d2c79e37c6a319d307af316119a9e9247612a2c (patch) | |
tree | 31d717c91e8595cf4197bbca625a01bd5a2735f3 /backend | |
parent | 9a5d59a8391c9e609285fb0c4985e12416075c0b (diff) | |
parent | 26a9fa81488a10f637d066c1ffabf1b780a0e48a (diff) |
Merge pull request #1537 from VincentVanlaer/cursor-dmabuf-nouveau
Add workaround for hardware cursors on nouveau
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 65d83949..635a78e2 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -725,6 +725,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); |