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

Alex Deucher alexdeucher at gmail.com
Mon Mar 6 15:16:46 UTC 2017


On Mon, Mar 6, 2017 at 4:33 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> 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>

For the series:
Reviewed-by: Alex Deucher <alexander.deucher 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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list