summarylogtreecommitdiffstats
path: root/0001-Revert-present-scmd-Check-that-the-flip-and-screen-p.patch
blob: e72c31b25b3980525be60f5f0da16dbf95a20b5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 2f0dd1816d556eef8c4b691330d39f13e1ed93f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
Date: Wed, 3 Jul 2019 11:53:56 +0200
Subject: [PATCH] Revert "present/scmd: Check that the flip and screen pixmap
 pitches match"

This reverts commit ef91da2757050652c724f6e674e8b1acf5d0cb31.

I thought this couldn't work under any circumstances, but I was wrong,
and drivers are already checking for cases that really cannot work.

Fixes issue #839.
---
 present/present_scmd.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/present/present_scmd.c b/present/present_scmd.c
index 7c2f80997..8417d0925 100644
--- a/present/present_scmd.c
+++ b/present/present_scmd.c
@@ -78,7 +78,7 @@ present_check_flip(RRCrtcPtr            crtc,
                    PresentFlipReason   *reason)
 {
     ScreenPtr                   screen = window->drawable.pScreen;
-    PixmapPtr                   screen_pixmap, window_pixmap;
+    PixmapPtr                   window_pixmap;
     WindowPtr                   root = screen->root;
     present_screen_priv_ptr     screen_priv = present_screen_priv(screen);
 
@@ -99,9 +99,8 @@ present_check_flip(RRCrtcPtr            crtc,
         return FALSE;
 
     /* Make sure the window hasn't been redirected with Composite */
-    screen_pixmap = screen->GetScreenPixmap(screen);
     window_pixmap = screen->GetWindowPixmap(window);
-    if (window_pixmap != screen_pixmap &&
+    if (window_pixmap != screen->GetScreenPixmap(screen) &&
         window_pixmap != screen_priv->flip_pixmap &&
         window_pixmap != present_flip_pending_pixmap(screen))
         return FALSE;
@@ -127,8 +126,7 @@ present_check_flip(RRCrtcPtr            crtc,
         window->drawable.x != pixmap->screen_x || window->drawable.y != pixmap->screen_y ||
 #endif
         window->drawable.width != pixmap->drawable.width ||
-        window->drawable.height != pixmap->drawable.height ||
-        pixmap->devKind != screen_pixmap->devKind) {
+        window->drawable.height != pixmap->drawable.height) {
         return FALSE;
     }
 
-- 
2.23.0