summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_present.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c
index 2fbcd25..ce88bd8 100644
--- a/src/amdgpu_present.c
+++ b/src/amdgpu_present.c
@@ -255,6 +255,7 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
xf86CrtcPtr xf86_crtc = crtc->devPrivate;
ScreenPtr screen = window->drawable.pScreen;
ScrnInfoPtr scrn = xf86_crtc->scrn;
+ PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
AMDGPUInfoPtr info = AMDGPUPTR(scrn);
int num_crtcs_on;
@@ -272,11 +273,16 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
if (info->drmmode.dri2_flipping)
return FALSE;
+#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1, 20, 99, 1, 0)
+ if (pixmap->devKind != screen_pixmap->devKind)
+ return FALSE;
+#endif
+
/* 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)))
+ amdgpu_pixmap_get_tiling_info(screen_pixmap))
return FALSE;
for (i = 0, num_crtcs_on = 0; i < config->num_crtc; i++) {