diff options
author | Jakob Bornecrantz <[email protected]> | 2010-05-25 18:58:33 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-05-25 19:05:07 +0100 |
commit | b9706886dbc1fd2eb3c671a8ecd3670f7a680fb9 (patch) | |
tree | 1ff8b3814e22d553e895f0a4143692bffc96a525 /src/gallium/winsys | |
parent | 395b605e19d5357c97f2d7d45673a80cd2c729ef (diff) |
drm_api: Remove type argument from create screen callback
With the removal of DRI1 support there where no use of this argument,
some drivers didn't even properly check it.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/i915/drm/i915_drm_api.c | 12 | ||||
-rw-r--r-- | src/gallium/winsys/i965/drm/i965_drm_api.c | 12 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm.c | 4 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm.h | 4 | ||||
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_screen_dri.c | 45 | ||||
-rw-r--r-- | src/gallium/winsys/sw/drm/sw_drm_api.c | 5 |
6 files changed, 22 insertions, 60 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_api.c b/src/gallium/winsys/i915/drm/i915_drm_api.c index 5dfd5a78798..b95df40e86c 100644 --- a/src/gallium/winsys/i915/drm/i915_drm_api.c +++ b/src/gallium/winsys/i915/drm/i915_drm_api.c @@ -49,21 +49,11 @@ i915_drm_winsys_destroy(struct i915_winsys *iws) } static struct pipe_screen * -i915_drm_create_screen(struct drm_api *api, int drmFD, - struct drm_create_screen_arg *arg) +i915_drm_create_screen(struct drm_api *api, int drmFD) { struct i915_drm_winsys *idws; unsigned int deviceID; - if (arg != NULL) { - switch(arg->mode) { - case DRM_CREATE_NORMAL: - break; - default: - return NULL; - } - } - idws = CALLOC_STRUCT(i915_drm_winsys); if (!idws) return NULL; diff --git a/src/gallium/winsys/i965/drm/i965_drm_api.c b/src/gallium/winsys/i965/drm/i965_drm_api.c index bd4dcfc9be7..87ee8070b1d 100644 --- a/src/gallium/winsys/i965/drm/i965_drm_api.c +++ b/src/gallium/winsys/i965/drm/i965_drm_api.c @@ -53,23 +53,13 @@ i965_libdrm_winsys_destroy(struct brw_winsys_screen *iws) } static struct pipe_screen * -i965_libdrm_create_screen(struct drm_api *api, int drmFD, - struct drm_create_screen_arg *arg) +i965_libdrm_create_screen(struct drm_api *api, int drmFD) { struct i965_libdrm_winsys *idws; unsigned int deviceID; debug_printf("%s\n", __FUNCTION__); - if (arg != NULL) { - switch(arg->mode) { - case DRM_CREATE_NORMAL: - break; - default: - return NULL; - } - } - idws = CALLOC_STRUCT(i965_libdrm_winsys); if (!idws) return NULL; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm.c b/src/gallium/winsys/radeon/drm/radeon_drm.c index 8d981b22e3d..59f1b10230e 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm.c @@ -153,9 +153,7 @@ static void do_ioctls(int fd, struct radeon_libdrm_winsys* winsys) } /* Create a pipe_screen. */ -struct pipe_screen* radeon_create_screen(struct drm_api* api, - int drmFB, - struct drm_create_screen_arg *arg) +struct pipe_screen* radeon_create_screen(struct drm_api* api, int drmFB) { struct radeon_libdrm_winsys* rws; boolean ret; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm.h b/src/gallium/winsys/radeon/drm/radeon_drm.h index 78451b6f011..3544c926d99 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm.h +++ b/src/gallium/winsys/radeon/drm/radeon_drm.h @@ -33,9 +33,7 @@ #include "state_tracker/drm_api.h" -struct pipe_screen* radeon_create_screen(struct drm_api* api, - int drmFB, - struct drm_create_screen_arg *arg); +struct pipe_screen* radeon_create_screen(struct drm_api* api, int drmFB); void radeon_destroy_drm_api(struct drm_api* api); diff --git a/src/gallium/winsys/svga/drm/vmw_screen_dri.c b/src/gallium/winsys/svga/drm/vmw_screen_dri.c index 4a710564b43..fe285226918 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_dri.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_dri.c @@ -89,44 +89,31 @@ vmw_dri1_check_version(const struct dri1_api_version *cur, * bottom of the file. */ static struct pipe_screen * -vmw_drm_create_screen(struct drm_api *drm_api, - int fd, - struct drm_create_screen_arg *arg) +vmw_drm_create_screen(struct drm_api *drm_api, int fd) { struct vmw_winsys_screen *vws; struct pipe_screen *screen; boolean use_old_scanout_flag = FALSE; - if (!arg || arg->mode == DRM_CREATE_NORMAL) { - struct dri1_api_version drm_ver; - drmVersionPtr ver; + struct dri1_api_version drm_ver; + drmVersionPtr ver; - ver = drmGetVersion(fd); - if (ver == NULL) - return NULL; + ver = drmGetVersion(fd); + if (ver == NULL) + return NULL; - drm_ver.major = ver->version_major; - drm_ver.minor = ver->version_minor; - drm_ver.patch_level = 0; /* ??? */ + 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; + 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) { - switch (arg->mode) { - case DRM_CREATE_NORMAL: - break; - default: - 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; vws = vmw_winsys_create( fd, use_old_scanout_flag ); if (!vws) diff --git a/src/gallium/winsys/sw/drm/sw_drm_api.c b/src/gallium/winsys/sw/drm/sw_drm_api.c index 2ccde610e60..7b86382619e 100644 --- a/src/gallium/winsys/sw/drm/sw_drm_api.c +++ b/src/gallium/winsys/sw/drm/sw_drm_api.c @@ -56,15 +56,14 @@ sw_drm_api(struct drm_api *api) static struct pipe_screen * -sw_drm_create_screen(struct drm_api *_api, int drmFD, - struct drm_create_screen_arg *arg) +sw_drm_create_screen(struct drm_api *_api, int drmFD) { struct sw_drm_api *swapi = sw_drm_api(_api); struct drm_api *api = swapi->api; struct sw_winsys *sww; struct pipe_screen *screen; - screen = api->create_screen(api, drmFD, arg); + screen = api->create_screen(api, drmFD); if (!screen) return NULL; |