xf86-video-amdgpu: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 28 17:36:20 UTC 2019
src/amdgpu_present.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit a636f42b496b0604ca00a144690ece61d1a88a27
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Feb 27 18:43:27 2019 +0100
present: Check that flip and screen pixmap pitches match
If they don't, flipping will result in corrupted display.
Test case:
* Run Xorg at 1920x1080 with no window manager
* glxgears -geometry 2048x1080
The Present extension code in xserver 1.21 will check for this.
Tested-by: Jax Lin <jax.lin at amd.com>
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++) {
More information about the xorg-commit
mailing list