diff options
author | Jakob Bornecrantz <[email protected]> | 2010-06-28 20:59:09 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-06-28 21:14:45 +0200 |
commit | a01e0afd9fc0d647081c6903baa1a7ba505c4b05 (patch) | |
tree | 7e04eb2b4e87137455920f6131b064dc87056e14 /src/gallium/state_trackers/xorg | |
parent | 250b92f3bb4fc4a53f3150b0e8ff1e121a5adbc7 (diff) | |
parent | 9ca563a9a8573bf79821abc75ccf0fdade19c8a9 (diff) |
Merge branch 'gallium-drm-driver-drescriptor'
Conflicts:
src/gallium/state_trackers/egl/x11/native_dri2.c
src/gallium/state_trackers/egl/x11/native_x11.c
src/gallium/state_trackers/egl/x11/native_x11.h
src/gallium/state_trackers/xorg/xorg_driver.c
src/gallium/winsys/radeon/drm/radeon_drm.c
Diffstat (limited to 'src/gallium/state_trackers/xorg')
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_crtc.c | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_dri2.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_driver.c | 29 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_tracker.h | 2 |
4 files changed, 9 insertions, 25 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c index f1a07bd863b..627754a0a4f 100644 --- a/src/gallium/state_trackers/xorg/xorg_crtc.c +++ b/src/gallium/state_trackers/xorg/xorg_crtc.c @@ -50,6 +50,7 @@ #include <X11/extensions/dpms.h> #endif +#include "state_tracker/drm_driver.h" #include "util/u_inlines.h" #include "util/u_rect.h" diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c index 4e01bd10306..704aed6a82c 100644 --- a/src/gallium/state_trackers/xorg/xorg_dri2.c +++ b/src/gallium/state_trackers/xorg/xorg_dri2.c @@ -42,6 +42,8 @@ #include "util/u_format.h" +#include "state_tracker/drm_driver.h" + /* Make all the #if cases in the code esier to read */ #ifndef DRI2INFOREC_VERSION #define DRI2INFOREC_VERSION 1 diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c index a7e57634aec..c69d75e22e8 100644 --- a/src/gallium/state_trackers/xorg/xorg_driver.c +++ b/src/gallium/state_trackers/xorg/xorg_driver.c @@ -51,6 +51,7 @@ #include <pciaccess.h> +#include "state_tracker/drm_driver.h" #include "pipe/p_context.h" #include "xorg_tracker.h" #include "xorg_winsys.h" @@ -269,18 +270,12 @@ drv_init_drm(ScrnInfoPtr pScrn) ); - ms->api = drm_api_create(); - ms->fd = drmOpen(ms->api ? ms->api->driver_name : NULL, BusID); + ms->fd = drmOpen(driver_descriptor.driver_name, BusID); xfree(BusID); if (ms->fd >= 0) return TRUE; - if (ms->api && ms->api->destroy) - ms->api->destroy(ms->api); - - ms->api = NULL; - return FALSE; } @@ -292,10 +287,6 @@ drv_close_drm(ScrnInfoPtr pScrn) { modesettingPtr ms = modesettingPTR(pScrn); - if (ms->api && ms->api->destroy) - ms->api->destroy(ms->api); - ms->api = NULL; - drmClose(ms->fd); ms->fd = -1; @@ -316,18 +307,11 @@ drv_init_resource_management(ScrnInfoPtr pScrn) if (ms->screen || ms->kms) return TRUE; - if (ms->api) { - ms->screen = ms->no3D ? NULL : - ms->api->create_screen(ms->api, ms->fd); - - if (ms->screen) - return TRUE; + if (!ms->no3D) + ms->screen = driver_descriptor.create_screen(ms->fd); - if (ms->api->destroy) - ms->api->destroy(ms->api); - - ms->api = NULL; - } + if (ms->screen) + return TRUE; #ifdef HAVE_LIBKMS if (!kms_create(ms->fd, &ms->kms)) @@ -433,7 +417,6 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags) } ms->fd = -1; - ms->api = NULL; if (!drv_init_drm(pScrn)) return FALSE; diff --git a/src/gallium/state_trackers/xorg/xorg_tracker.h b/src/gallium/state_trackers/xorg/xorg_tracker.h index df56ad1b155..a5178ef43a4 100644 --- a/src/gallium/state_trackers/xorg/xorg_tracker.h +++ b/src/gallium/state_trackers/xorg/xorg_tracker.h @@ -49,7 +49,6 @@ #include "pipe/p_screen.h" #include "util/u_inlines.h" #include "util/u_debug.h" -#include "state_tracker/drm_api.h" #define DRV_ERROR(msg) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, msg); @@ -125,7 +124,6 @@ typedef struct _modesettingRec struct kms_bo *root_bo; /* gallium */ - struct drm_api *api; struct pipe_screen *screen; struct pipe_context *ctx; boolean d_depth_bits_last; |