summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/identity/id_drm.c8
-rw-r--r--src/gallium/drivers/trace/tr_drm.c9
-rw-r--r--src/gallium/include/state_tracker/drm_api.h19
-rw-r--r--src/gallium/state_trackers/dri/drm/dri2.c2
-rw-r--r--src/gallium/state_trackers/egl/x11/native_dri2.c2
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c2
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_api.c12
-rw-r--r--src/gallium/winsys/i965/drm/i965_drm_api.c12
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm.c4
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm.h4
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen_dri.c45
-rw-r--r--src/gallium/winsys/sw/drm/sw_drm_api.c5
12 files changed, 30 insertions, 94 deletions
diff --git a/src/gallium/drivers/identity/id_drm.c b/src/gallium/drivers/identity/id_drm.c
index a9d41af18c..15d01519f8 100644
--- a/src/gallium/drivers/identity/id_drm.c
+++ b/src/gallium/drivers/identity/id_drm.c
@@ -46,17 +46,13 @@ identity_drm_api(struct drm_api *_api)
}
static struct pipe_screen *
-identity_drm_create_screen(struct drm_api *_api, int fd,
- struct drm_create_screen_arg *arg)
+identity_drm_create_screen(struct drm_api *_api, int fd)
{
struct identity_drm_api *id_api = identity_drm_api(_api);
struct drm_api *api = id_api->api;
struct pipe_screen *screen;
- if (arg && arg->mode != DRM_CREATE_NORMAL)
- return NULL;
-
- screen = api->create_screen(api, fd, arg);
+ screen = api->create_screen(api, fd);
return identity_screen_create(screen);
}
diff --git a/src/gallium/drivers/trace/tr_drm.c b/src/gallium/drivers/trace/tr_drm.c
index 9c7d39201a..e685033212 100644
--- a/src/gallium/drivers/trace/tr_drm.c
+++ b/src/gallium/drivers/trace/tr_drm.c
@@ -47,8 +47,7 @@ trace_drm_api(struct drm_api *_api)
}
static struct pipe_screen *
-trace_drm_create_screen(struct drm_api *_api, int fd,
- struct drm_create_screen_arg *arg)
+trace_drm_create_screen(struct drm_api *_api, int fd)
{
struct trace_drm_api *tr_api = trace_drm_api(_api);
struct drm_api *api = tr_api->api;
@@ -56,11 +55,7 @@ trace_drm_create_screen(struct drm_api *_api, int fd,
/* TODO trace call */
- if (arg && arg->mode != DRM_CREATE_NORMAL)
- return NULL;
-
- screen = api->create_screen(api, fd, arg);
-
+ screen = api->create_screen(api, fd);
return trace_screen_create(rbug_screen_create(screen));
}
diff --git a/src/gallium/include/state_tracker/drm_api.h b/src/gallium/include/state_tracker/drm_api.h
index 8fd0995444..4572c7e042 100644
--- a/src/gallium/include/state_tracker/drm_api.h
+++ b/src/gallium/include/state_tracker/drm_api.h
@@ -9,13 +9,6 @@ struct pipe_winsys;
struct pipe_context;
struct pipe_resource;
-enum drm_create_screen_mode {
- DRM_CREATE_NORMAL = 0,
- DRM_CREATE_DRI1,
- DRM_CREATE_DRIVER = 1024,
- DRM_CREATE_MAX
-};
-
#define DRM_API_HANDLE_TYPE_SHARED 0
#define DRM_API_HANDLE_TYPE_KMS 1
@@ -42,15 +35,6 @@ struct winsys_handle
unsigned stride;
};
-/**
- * Modes other than DRM_CREATE_NORMAL derive from this struct.
- */
-/*@{*/
-struct drm_create_screen_arg {
- enum drm_create_screen_mode mode;
-};
-/*@}*/
-
struct drm_api
{
void (*destroy)(struct drm_api *api);
@@ -65,8 +49,7 @@ struct drm_api
/**
* Create a pipe srcreen.
*/
- struct pipe_screen* (*create_screen)(struct drm_api *api, int drm_fd,
- struct drm_create_screen_arg *arg);
+ struct pipe_screen* (*create_screen)(struct drm_api *api, int drm_fd);
};
extern struct drm_api * drm_api_create(void);
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 6c022f4bbf..f4cc8d77eb 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -518,7 +518,7 @@ dri2_init_screen(__DRIscreen * sPriv)
sPriv->private = (void *)screen;
sPriv->extensions = dri_screen_extensions;
- pscreen = screen->api->create_screen(screen->api, screen->fd, NULL);
+ pscreen = screen->api->create_screen(screen->api, screen->fd);
/* dri_init_screen_helper checks pscreen for us */
configs = dri_init_screen_helper(screen, pscreen, 32);
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c
index 63877ed5e5..3f802dd713 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -718,7 +718,7 @@ dri2_display_init_screen(struct native_display *ndpy)
if (fd < 0)
return FALSE;
- dri2dpy->base.screen = dri2dpy->api->create_screen(dri2dpy->api, fd, NULL);
+ dri2dpy->base.screen = dri2dpy->api->create_screen(dri2dpy->api, fd);
if (!dri2dpy->base.screen) {
_eglLog(_EGL_WARNING, "failed to create DRM screen");
return FALSE;
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 44520b81b6..84c0545b1b 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -311,7 +311,7 @@ drv_init_resource_management(ScrnInfoPtr pScrn)
return TRUE;
if (ms->api) {
- ms->screen = ms->api->create_screen(ms->api, ms->fd, NULL);
+ ms->screen = ms->api->create_screen(ms->api, ms->fd);
if (ms->screen)
return TRUE;
diff --git a/src/gallium/winsys/i915/drm/i915_drm_api.c b/src/gallium/winsys/i915/drm/i915_drm_api.c
index 5dfd5a7879..b95df40e86 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 bd4dcfc9be..87ee8070b1 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 8d981b22e3..59f1b10230 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 78451b6f01..3544c926d9 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 4a710564b4..fe28522691 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 2ccde610e6..7b86382619 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;