diff options
author | Thomas Hellstrom <[email protected]> | 2010-01-18 15:55:17 +0100 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2010-01-18 15:56:57 +0100 |
commit | ae97520e37ee70c813a198c805c7338aefbd8156 (patch) | |
tree | 630a0bcb17d9ce0be7f94f02ecd23f9e96817eae | |
parent | 5f2d60a7154f896bb418231662663465269ce9b8 (diff) |
ws/vmware: Check DRM version also when bootstrapping in dri2 mode.
Signed-off-by: Thomas Hellstrom <[email protected]>
-rw-r--r-- | src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c | 17 |
1 files changed, 17 insertions, 0 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 5995eee34ba..7c47d434f0e 100644 --- a/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c +++ b/src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c @@ -85,6 +85,23 @@ vmw_drm_create_screen(struct drm_api *drm_api, struct pipe_screen *screen; struct dri1_create_screen_arg *dri1; + if (!arg || arg->mode == DRM_CREATE_NORMAL) { + struct dri1_api_version drm_ver; + drmVersionPtr ver; + + ver = drmGetVersion(fd); + if (ver == NULL) + return NULL; + + drm_ver.major = ver->version_major; + drm_ver.minor = ver->version_minor; + + drmFreeVersion(ver); + if (!vmw_dri1_check_version(&drm_ver, &drm_required, + &drm_compat, "vmwgfx drm driver")) + return NULL; + } + if (arg != NULL) { switch (arg->mode) { case DRM_CREATE_NORMAL: |