summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-10-27 11:22:36 +0900
committerMichel Dänzer <michel@daenzer.net>2016-10-27 11:22:36 +0900
commitdd4a740714e481b09312a04883aa6e0f5200ca81 (patch)
tree136f7fa1d8364351110bcc69b7da213d3c8d96fe
parent3c1f4386ba7d0b6c16bdd2b2178f978f2f154ba8 (diff)
present: Check tiling info for flips
The kernel driver doesn't handle flipping between buffers with different tiling parameters correctly. Fixes display corruption with fullscreen apps using different tiling modes (e.g. due to R600_DEBUG=notiling or R600_DEBUG=no2d) via DRI3. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/amdgpu_present.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c
index e36778c..dcb18da 100644
--- a/src/amdgpu_present.c
+++ b/src/amdgpu_present.c
@@ -262,6 +262,13 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
if (info->drmmode.dri2_flipping)
return FALSE;
+ /* The kernel driver doesn't handle flipping between BOs with different
+ * tiling parameters correctly yet
+ */
+ if (amdgpu_pixmap_get_tiling_info(pixmap) !=
+ amdgpu_pixmap_get_tiling_info(screen->GetScreenPixmap(screen)))
+ return FALSE;
+
return amdgpu_present_check_unflip(scrn);
}