aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-06-23 23:03:28 +0200
committerJakob Bornecrantz <[email protected]>2010-06-23 23:15:07 +0200
commitcf91accc93b9f172b2f7c970f39e69b268a5bb26 (patch)
treeb8eb030cea7d76b0a26a20cc8a35415991aacbe5 /src/gallium/winsys
parent10e3b9f4d029df5c6c01a5d76c9085c48d82ac43 (diff)
nouveau: Move bootstrap code to targets
Well sorta, at least I removed the drm_api dependancy and the target can layer anything it wants to now.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_public.h9
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c18
-rw-r--r--src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h2
3 files changed, 12 insertions, 17 deletions
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_public.h b/src/gallium/winsys/nouveau/drm/nouveau_drm_public.h
new file mode 100644
index 00000000000..67b7c4429df
--- /dev/null
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_public.h
@@ -0,0 +1,9 @@
+
+#ifndef __NOUVEAU_DRM_PUBLIC_H__
+#define __NOUVEAU_DRM_PUBLIC_H__
+
+struct pipe_screen;
+
+struct pipe_screen *nouveau_drm_screen_create(int drmFD);
+
+#endif
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
index 418f1d708a7..660dbd0c332 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
@@ -5,6 +5,7 @@
#include "util/u_inlines.h"
#include "nouveau_drm_winsys.h"
+#include "nouveau_drm_public.h"
#include "nouveau_drmif.h"
#include "nouveau_channel.h"
@@ -22,8 +23,8 @@ nouveau_drm_destroy_winsys(struct pipe_winsys *s)
FREE(nv_winsys);
}
-static struct pipe_screen *
-nouveau_drm_create_screen(struct drm_api *api, int fd)
+struct pipe_screen *
+nouveau_drm_screen_create(int fd)
{
struct nouveau_winsys *nvws;
struct pipe_winsys *ws;
@@ -70,16 +71,3 @@ nouveau_drm_create_screen(struct drm_api *api, int fd)
return nvws->pscreen;
}
-
-static struct drm_api nouveau_drm_api_hooks = {
- .name = "nouveau",
- .driver_name = "nouveau",
- .create_screen = nouveau_drm_create_screen,
- .destroy = NULL,
-};
-
-struct drm_api *
-drm_api_create() {
- return &nouveau_drm_api_hooks;
-}
-
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h
index ae3ab17d743..9e529ecad3d 100644
--- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h
+++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h
@@ -1,8 +1,6 @@
#ifndef __NOUVEAU_DRM_WINSYS_H__
#define __NOUVEAU_DRM_WINSYS_H__
-#include "state_tracker/drm_api.h"
-
#include "util/u_simple_screen.h"
#include "nouveau_dri.h"