summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-09-08 17:52:25 +0900
committerMichel Dänzer <michel@daenzer.net>2016-09-09 19:03:14 +0900
commit4927b84ec84bc0cb5055686cca6be54390f82803 (patch)
treeff70897db3f8bc897197f2e2da015db2f1786629
parent1c725f63961746258f6138b47037ec18bf508d78 (diff)
Move up amdgpu_scanout_extents_intersect
Will be needed higher up by the following changes. No functional change. (Ported from radeon commit 2f6e5fb15f1a9ce523c85550e493f8bda9d0c00f) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/amdgpu_kms.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index c75d429..7ec86fb 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -303,6 +303,23 @@ static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
return TRUE;
}
+static Bool
+amdgpu_scanout_extents_intersect(xf86CrtcPtr xf86_crtc, BoxPtr extents)
+{
+ extents->x1 -= xf86_crtc->filter_width >> 1;
+ extents->x2 += xf86_crtc->filter_width >> 1;
+ extents->y1 -= xf86_crtc->filter_height >> 1;
+ extents->y2 += xf86_crtc->filter_height >> 1;
+ pixman_f_transform_bounds(&xf86_crtc->f_framebuffer_to_crtc, extents);
+
+ extents->x1 = max(extents->x1, 0);
+ extents->y1 = max(extents->y1, 0);
+ extents->x2 = min(extents->x2, xf86_crtc->mode.HDisplay);
+ extents->y2 = min(extents->y2, xf86_crtc->mode.VDisplay);
+
+ return (extents->x1 < extents->x2 && extents->y1 < extents->y2);
+}
+
#ifdef AMDGPU_PIXMAP_SHARING
static RegionPtr
@@ -559,23 +576,6 @@ amdgpu_dirty_update(ScrnInfoPtr scrn)
#endif
static Bool
-amdgpu_scanout_extents_intersect(xf86CrtcPtr xf86_crtc, BoxPtr extents)
-{
- extents->x1 -= xf86_crtc->filter_width >> 1;
- extents->x2 += xf86_crtc->filter_width >> 1;
- extents->y1 -= xf86_crtc->filter_height >> 1;
- extents->y2 += xf86_crtc->filter_height >> 1;
- pixman_f_transform_bounds(&xf86_crtc->f_framebuffer_to_crtc, extents);
-
- extents->x1 = max(extents->x1, 0);
- extents->y1 = max(extents->y1, 0);
- extents->x2 = min(extents->x2, xf86_crtc->mode.HDisplay);
- extents->y2 = min(extents->y2, xf86_crtc->mode.VDisplay);
-
- return (extents->x1 < extents->x2 && extents->y1 < extents->y2);
-}
-
-static Bool
amdgpu_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id)
{
drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private;