[PATCH] Adapt to load_cursor_argb signature change in xserver 1.15.99.902

Alex Deucher alexdeucher at gmail.com
Tue Apr 15 06:09:33 PDT 2014


On Tue, Apr 15, 2014 at 4:59 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Apart from the compiler warning below, not doing this may result in
> accidentally using software cursors.
>
> ../../src/drmmode_display.c:808:5: warning: initialization from incompatible pointer type [enabled by default]
>      .load_cursor_argb = drmmode_load_cursor_argb,
>      ^
> ../../src/drmmode_display.c:808:5: warning: (near initialization for 'drmmode_crtc_funcs.load_cursor_argb') [enabled by default]
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/drmmode_display.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 02bdf9e..fc99128 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -590,7 +590,11 @@ drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
>         drmModeMoveCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, x, y);
>  }
>
> +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0)
> +static Bool
> +#else
>  static void
> +#endif
>  drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
>  {
>         ScrnInfoPtr pScrn = crtc->scrn;
> @@ -605,6 +609,10 @@ drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
>
>         for (i = 0; i < cursor_size; i++)
>                 ptr[i] = cpu_to_le32(image[i]);
> +
> +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0)
> +       return TRUE;
> +#endif
>  }
>
>
> --
> 1.9.0
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list