vmware: Require libdrm 2.4.38 to build XMir.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
This commit is contained in:
Thomas Hellstrom
2014-01-09 13:53:59 +01:00
parent d6b179a5ad
commit 31bff9f7f3
6 changed files with 14 additions and 2 deletions

View File

@@ -127,6 +127,12 @@ if test x$BUILD_VMWGFX = xyes; then
[AC_DEFINE([HAVE_XA_2], 1,
[Has version 2 of XA])])],
[],[BUILD_VMWGFX=no])
#
# Check for prime.
#
PKG_CHECK_EXISTS([libdrm >= 2.4.38],
[AC_DEFINE([HAVE_LIBDRM_2_4_38], 1,
[Has version 2.4.38 or greater of libdrm])])
fi
DRIVER_NAME=vmware

View File

@@ -501,6 +501,7 @@ vmwgfx_max_fb_size(int drm_fd, size_t *size)
return 0;
}
#ifdef HAVE_LIBDRM_2_4_38
/**
* vmwgfx_prime_fd_to_handle - Return a TTM handle to a prime object
*
@@ -537,3 +538,4 @@ vmwgfx_prime_release_handle(int drm_fd, uint32_t handle)
(void) drmCommandWrite(drm_fd, DRM_VMW_UNREF_SURFACE, &s_arg,
sizeof(s_arg));
}
#endif /* HAVE_LIBDRM_2_4_38 */

View File

@@ -85,9 +85,11 @@ vmwgfx_update_gui_layout(int drm_fd, unsigned int num_rects,
int
vmwgfx_get_param(int drm_fd, uint32_t param, uint64_t *out);
#ifdef HAVE_LIBDRM_2_4_38
int
vmwgfx_prime_fd_to_handle(int drm_fd, int prime_fd, uint32_t *handle);
void
vmwgfx_prime_release_handle(int drm_fd, uint32_t handle);
#endif /* HAVE_LIBDRM_2_4_38 */
#endif

View File

@@ -1618,7 +1618,7 @@ vmwgfx_saa_drop_master(ScreenPtr pScreen)
* Helpers for hosted.
*/
#if (XA_TRACKER_VERSION_MAJOR >= 2)
#if (XA_TRACKER_VERSION_MAJOR >= 2) && defined(HAVE_LIBDRM_2_4_38)
/**
* vmwgfx_saa_copy_to_surface - Copy Drawable contents to an external surface.

View File

@@ -116,9 +116,11 @@ vmwgfx_saa_set_master(ScreenPtr pScreen);
void
vmwgfx_saa_drop_master(ScreenPtr pScreen);
#if (XA_TRACKER_VERSION_MAJOR >= 2) && defined(HAVE_LIBDRM_2_4_38)
Bool
vmwgfx_saa_copy_to_surface(DrawablePtr pDraw, uint32_t surface_fd,
const BoxRec *dst_box, RegionPtr region);
#endif /* (XA_TRACKER_VERSION_MAJOR >= 2) && defined(HAVE_LIBDRM_2_4_38) */
#if (XA_TRACKER_VERSION_MAJOR <= 1) && !defined(HAVE_XA_2)

View File

@@ -32,7 +32,7 @@
#include "vmwgfx_hosted_priv.h"
#include <xa_tracker.h>
#if XMIR && (XA_TRACKER_VERSION_MAJOR >= 2)
#if XMIR && (XA_TRACKER_VERSION_MAJOR >= 2) && defined(HAVE_LIBDRM_2_4_38)
#include "vmwgfx_hosted.h"
#include "vmwgfx_saa.h"