summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-02-06 01:21:36 +0100
committerJakob Bornecrantz <jakob@vmware.com>2010-02-06 03:36:47 +0100
commit6ffb6318a05f0e6405645a155cd32e5cfbdbc2ff (patch)
treef5cc6f1acf8b0a442bb44daace1eb7b5e4f3f75f /src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
parenta9d61c286d27733d347f81ac7cfae3665accae92 (diff)
vmware/core: Handle new scanout field
Diffstat (limited to 'src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c')
-rw-r--r--src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c b/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
index 917b49f1c1..b7c02f6717 100644
--- a/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
+++ b/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
@@ -51,6 +51,7 @@ static struct dri1_api_version dri_required = { 4, 0, 0 };
static struct dri1_api_version dri_compat = { 4, 0, 0 };
static struct dri1_api_version drm_required = { 0, 1, 0 };
static struct dri1_api_version drm_compat = { 0, 0, 0 };
+static struct dri1_api_version drm_scanout = { 0, 9, 0 };
static boolean
vmw_dri1_check_version(const struct dri1_api_version *cur,
@@ -85,6 +86,7 @@ vmw_drm_create_screen(struct drm_api *drm_api,
struct vmw_winsys_screen *vws;
struct pipe_screen *screen;
struct dri1_create_screen_arg *dri1;
+ boolean use_old_scanout_flag = FALSE;
if (!arg || arg->mode == DRM_CREATE_NORMAL) {
struct dri1_api_version drm_ver;
@@ -96,11 +98,16 @@ vmw_drm_create_screen(struct drm_api *drm_api,
drm_ver.major = ver->version_major;
drm_ver.minor = ver->version_minor;
+ drm_ver.patch_level = 0; /* ??? */
drmFreeVersion(ver);
if (!vmw_dri1_check_version(&drm_ver, &drm_required,
&drm_compat, "vmwgfx drm driver"))
return NULL;
+
+ if (!vmw_dri1_check_version(&drm_ver, &drm_scanout,
+ &drm_compat, "use old scanout field (not a error)"))
+ use_old_scanout_flag = TRUE;
}
if (arg != NULL) {
@@ -118,6 +125,9 @@ vmw_drm_create_screen(struct drm_api *drm_api,
if (!vmw_dri1_check_version(&dri1->drm_version, &drm_required,
&drm_compat, "vmwgfx drm driver"))
return NULL;
+ if (!vmw_dri1_check_version(&dri1->drm_version, &drm_scanout,
+ &drm_compat, "use old scanout field (not a error)"))
+ use_old_scanout_flag = TRUE;
dri1->api = &dri1_api_hooks;
break;
default:
@@ -125,7 +135,7 @@ vmw_drm_create_screen(struct drm_api *drm_api,
}
}
- vws = vmw_winsys_create( fd );
+ vws = vmw_winsys_create( fd, use_old_scanout_flag );
if (!vws)
goto out_no_vws;