summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-03-06 18:23:41 +0900
committerMichel Dänzer <michel@daenzer.net>2017-03-07 16:56:51 +0900
commit86907a5e4ce33154167b330570491f88218725d3 (patch)
tree805e148beaf866498c6f977a747a7825b3a59596
parent8d2b7d1758e3fcac520a18a0684c073f0ac62389 (diff)
Only define transform_region for XF86_CRTC_VERSION >= 4
Not used with older versions of Xorg. Fixes warning in that case: ../../src/amdgpu_kms.c:328:1: warning: ‘transform_region’ defined but not used [-Wunused-function] transform_region(RegionPtr region, struct pict_f_transform *transform, ^~~~~~~~~~~~~~~~ Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/amdgpu_kms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index bfc3530..d48ad48 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -324,6 +324,8 @@ amdgpu_scanout_extents_intersect(xf86CrtcPtr xf86_crtc, BoxPtr extents)
return (extents->x1 < extents->x2 && extents->y1 < extents->y2);
}
+#if XF86_CRTC_VERSION >= 4
+
static RegionPtr
transform_region(RegionPtr region, struct pict_f_transform *transform,
int w, int h)
@@ -362,6 +364,8 @@ transform_region(RegionPtr region, struct pict_f_transform *transform,
return transformed;
}
+#endif
+
static void
amdgpu_sync_scanout_pixmaps(xf86CrtcPtr xf86_crtc, RegionPtr new_region,
int scanout_id)