xf86-video-ati/U_18-Move-up-radeon_scanout_extents_intersect.patch
Max Staudt 84a4590c79 Accepting request 438260 from home:mstaudt:branches:X11:XOrg
- U_01-* ... U_20-* :
  Include patches that haven't made it into the 7.7.1 release.

  This means almost all commits between xf86-video-ati-7.7.0
  and 12d30eeb9711bd2b1609d6bbb74c4a1760596f72.

  Fixes (bsc#990066).

OBS-URL: https://build.opensuse.org/request/show/438260
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xf86-video-ati?expand=0&rev=51
2016-11-02 10:39:34 +00:00

77 lines
2.3 KiB
Diff

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;