aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/r600/drm/r600_drm.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-06-24 02:10:18 +0200
committerJakob Bornecrantz <[email protected]>2010-06-24 02:15:50 +0200
commit92fde20de33d9ffb4ddce9b03eebbfbffe9d93bc (patch)
treedc5f7a068049a2c81e28a227734e15e3f25eacaa /src/gallium/winsys/r600/drm/r600_drm.c
parentcf91accc93b9f172b2f7c970f39e69b268a5bb26 (diff)
r600g: Move bootstrap code to target
Diffstat (limited to 'src/gallium/winsys/r600/drm/r600_drm.c')
-rw-r--r--src/gallium/winsys/r600/drm/r600_drm.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_drm.c b/src/gallium/winsys/r600/drm/r600_drm.c
index b772ff0dd9f..469f1446d05 100644
--- a/src/gallium/winsys/r600/drm/r600_drm.c
+++ b/src/gallium/winsys/r600/drm/r600_drm.c
@@ -26,21 +26,18 @@
* Joakim Sindholt <[email protected]>
*/
#include <sys/ioctl.h>
-#include "trace/tr_drm.h"
#include "util/u_inlines.h"
#include "util/u_debug.h"
-#include "state_tracker/drm_api.h"
#include "radeon_priv.h"
#include "r600_screen.h"
#include "r600_texture.h"
+#include "r600_public.h"
+#include "r600_drm_public.h"
+#include "state_tracker/drm_driver.h"
-static struct pipe_screen *r600_drm_create_screen(struct drm_api* api, int drmfd)
+struct radeon *r600_drm_winsys_create(int drmfd)
{
- struct radeon *rw = radeon_new(drmfd, 0);
-
- if (rw == NULL)
- return NULL;
- return radeon_create_screen(rw);
+ return radeon_new(drmfd, 0);
}
boolean r600_buffer_get_handle(struct radeon *rw,
@@ -63,24 +60,3 @@ boolean r600_buffer_get_handle(struct radeon *rw,
whandle->handle = rbuffer->flink;
return TRUE;
}
-
-static void r600_drm_api_destroy(struct drm_api *api)
-{
- return;
-}
-
-struct drm_api drm_api_hooks = {
- .name = "r600",
- .driver_name = "r600",
- .create_screen = r600_drm_create_screen,
- .destroy = r600_drm_api_destroy,
-};
-
-struct drm_api* drm_api_create()
-{
-#ifdef DEBUG
- return trace_drm_create(&drm_api_hooks);
-#else
- return &drm_api_hooks;
-#endif
-}