[PATCH xf86-video-amdgpu 3/3] Only define transform_region for XF86_CRTC_VERSION >= 4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michel Dänzer <michel.daenzer@xxxxxxx>

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,
 ^~~~~~~~~~~~~~~~

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/amdgpu_kms.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index bfc353096..d48ad480a 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)
-- 
2.11.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux