LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File U_18-Move-up-radeon_scanout_extents_intersect.patch of Package xf86-video-ati (Project home:lbssousa:leap42.1-backports)

From: Michel Dänzer <michel.daenzer@amd.com>
Date: Fri Sep 2 17:23:16 2016 +0900
Subject: [PATCH 18/20]Move up radeon_scanout_extents_intersect
Patch-mainline: Upstream
Git-repo: git://anongit.freedesktop.org/xorg/driver/xf86-video-ati
Git-commit: 2f6e5fb15f1a9ce523c85550e493f8bda9d0c00f
References: bsc#990066
Signed-off-by: Max Staudt <mstaudt@suse.de>

Will be needed higher up by the following changes. No functional change.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
 src/radeon_kms.c | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 7173b77..568c49e 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -381,6 +381,27 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen)
     return TRUE;
 }

+static Bool
+radeon_scanout_extents_intersect(xf86CrtcPtr xf86_crtc, BoxPtr extents, int w,
+				 int h)
+{
+    extents->x1 = max(extents->x1 - xf86_crtc->x, 0);
+    extents->y1 = max(extents->y1 - xf86_crtc->y, 0);
+
+    switch (xf86_crtc->rotation & 0xf) {
+    case RR_Rotate_90:
+    case RR_Rotate_270:
+	extents->x2 = min(extents->x2 - xf86_crtc->x, h);
+	extents->y2 = min(extents->y2 - xf86_crtc->y, w);
+	break;
+    default:
+	extents->x2 = min(extents->x2 - xf86_crtc->x, w);
+	extents->y2 = min(extents->y2 - xf86_crtc->y, h);
+    }
+
+    return (extents->x1 < extents->x2 && extents->y1 < extents->y2);
+}
+
 #ifdef RADEON_PIXMAP_SHARING

 static RegionPtr
@@ -636,27 +657,6 @@ radeon_dirty_update(ScrnInfoPtr scrn)
 #endif

 static Bool
-radeon_scanout_extents_intersect(xf86CrtcPtr xf86_crtc, BoxPtr extents, int w,
-				 int h)
-{
-    extents->x1 = max(extents->x1 - xf86_crtc->x, 0);
-    extents->y1 = max(extents->y1 - xf86_crtc->y, 0);
-
-    switch (xf86_crtc->rotation & 0xf) {
-    case RR_Rotate_90:
-    case RR_Rotate_270:
-	extents->x2 = min(extents->x2 - xf86_crtc->x, h);
-	extents->y2 = min(extents->y2 - xf86_crtc->y, w);
-	break;
-    default:
-	extents->x2 = min(extents->x2 - xf86_crtc->x, w);
-	extents->y2 = min(extents->y2 - xf86_crtc->y, h);
-    }
-
-    return (extents->x1 < extents->x2 && extents->y1 < extents->y2);
-}
-
-static Bool
 radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id)
 {
     drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private;