[Spice-devel] [xf86-video-qxl] Provide compatibility for Xorg list code with Xorg < 1.12, for RHEL 6 support (resend)
Dave Airlie
airlied at gmail.com
Sat Sep 14 17:41:52 PDT 2013
On Sat, Sep 14, 2013 at 5:40 AM, Jeremy White <jwhite at codeweavers.com> wrote:
> Signed-off-by: Jeremy White <jwhite at codeweavers.com>
> ---
> src/qxl.h | 12 +++++++++++-
> src/qxl_kms.c | 2 +-
> src/qxl_mem.c | 2 +-
> 3 files changed, 13 insertions(+), 3 deletions(-)
Seems fine to me, ACK
Dave.
>
> diff --git a/src/qxl.h b/src/qxl.h
> index c026b63..a3bc7db 100644
> --- a/src/qxl.h
> +++ b/src/qxl.h
> @@ -56,6 +56,16 @@
>
> #include "qxl_drmmode.h"
>
> +#if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 11, 99, 903, 0))
> +typedef struct list xorg_list_t;
> +#define xorg_list_init list_init
> +#define xorg_list_add list_add
> +#define xorg_list_del list_del
> +#define xorg_list_for_each_entry list_for_each_entry
> +#else
> +typedef struct xorg_list xorg_list_t;
> +#endif
> +
> #include "compat-api.h"
> #define hidden _X_HIDDEN
>
> @@ -332,7 +342,7 @@ struct _qxl_screen_t
> #endif /* XSPICE */
>
> uint32_t deferred_fps;
> - struct xorg_list ums_bos;
> + xorg_list_t ums_bos;
> struct qxl_bo_funcs *bo_funcs;
>
> Bool kms_enabled;
> diff --git a/src/qxl_kms.c b/src/qxl_kms.c
> index 32859cc..6c5b427 100644
> --- a/src/qxl_kms.c
> +++ b/src/qxl_kms.c
> @@ -338,7 +338,7 @@ struct qxl_kms_bo {
> const char *name;
> uint32_t size;
> int type;
> - struct xorg_list bos;
> + xorg_list_t bos;
> void *mapping;
> qxl_screen_t *qxl;
> int refcnt;
> diff --git a/src/qxl_mem.c b/src/qxl_mem.c
> index 44be8c4..fde0976 100644
> --- a/src/qxl_mem.c
> +++ b/src/qxl_mem.c
> @@ -448,7 +448,7 @@ struct qxl_ums_bo {
> void *internal_virt_addr;
> int refcnt;
> qxl_screen_t *qxl;
> - struct xorg_list bos;
> + xorg_list_t bos;
> };
>
> static struct qxl_bo *qxl_bo_alloc_internal(qxl_screen_t *qxl, int type, int flags, unsigned long size, const char *name)
> --
> 1.7.10.4
>
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list