diff options
Diffstat (limited to 'src/gallium/winsys/nouveau')
-rw-r--r-- | src/gallium/winsys/nouveau/drm/nouveau_dri.h | 28 | ||||
-rw-r--r-- | src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c | 32 | ||||
-rw-r--r-- | src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h | 28 |
3 files changed, 2 insertions, 86 deletions
diff --git a/src/gallium/winsys/nouveau/drm/nouveau_dri.h b/src/gallium/winsys/nouveau/drm/nouveau_dri.h deleted file mode 100644 index 1207c2d609c..00000000000 --- a/src/gallium/winsys/nouveau/drm/nouveau_dri.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _NOUVEAU_DRI_ -#define _NOUVEAU_DRI_ - -#include "xf86drm.h" -#include "drm.h" -#include "nouveau_drm.h" - -struct nouveau_dri { - uint32_t device_id; /**< \brief PCI device ID */ - uint32_t width; /**< \brief width in pixels of display */ - uint32_t height; /**< \brief height in scanlines of display */ - uint32_t depth; /**< \brief depth of display (8, 15, 16, 24) */ - uint32_t bpp; /**< \brief bit depth of display (8, 16, 24, 32) */ - - uint32_t bus_type; /**< \brief ths bus type */ - uint32_t bus_mode; /**< \brief bus mode (used for AGP, maybe also for PCI-E ?) */ - - uint32_t front_offset; /**< \brief front buffer offset */ - uint32_t front_pitch; /**< \brief front buffer pitch */ - uint32_t back_offset; /**< \brief private back buffer offset */ - uint32_t back_pitch; /**< \brief private back buffer pitch */ - uint32_t depth_offset; /**< \brief private depth buffer offset */ - uint32_t depth_pitch; /**< \brief private depth buffer pitch */ - -}; - -#endif - diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c index 7d7a2769fa4..084eda96b2a 100644 --- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c +++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c @@ -4,7 +4,6 @@ #include "util/u_memory.h" #include "util/u_inlines.h" -#include "nouveau_drm_winsys.h" #include "nouveau_drm_public.h" #include "nouveau_drmif.h" @@ -14,24 +13,11 @@ #include "nouveau/nouveau_winsys.h" #include "nouveau/nouveau_screen.h" -static void -nouveau_drm_destroy_winsys(struct pipe_winsys *s) -{ - struct nouveau_winsys *nv_winsys = nouveau_winsys(s); - struct nouveau_screen *nv_screen= nouveau_screen(nv_winsys->pscreen); - if (nv_screen) - nouveau_device_close(&nv_screen->device); - FREE(nv_winsys); -} - struct pipe_screen * nouveau_drm_screen_create(int fd) { - struct nouveau_winsys *nvws; - struct pipe_winsys *ws; struct nouveau_device *dev = NULL; - struct pipe_screen *(*init)(struct pipe_winsys *, - struct nouveau_device *); + struct pipe_screen *(*init)(struct nouveau_device *); int ret; ret = nouveau_device_open_existing(&dev, 0, fd, 0); @@ -60,19 +46,5 @@ nouveau_drm_screen_create(int fd) return NULL; } - nvws = CALLOC_STRUCT(nouveau_winsys); - if (!nvws) { - nouveau_device_close(&dev); - return NULL; - } - ws = &nvws->base; - ws->destroy = nouveau_drm_destroy_winsys; - - nvws->pscreen = init(ws, dev); - if (!nvws->pscreen) { - ws->destroy(ws); - return NULL; - } - - return nvws->pscreen; + return init(dev); } diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h deleted file mode 100644 index 9e529ecad3d..00000000000 --- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __NOUVEAU_DRM_WINSYS_H__ -#define __NOUVEAU_DRM_WINSYS_H__ - -#include "util/u_simple_screen.h" - -#include "nouveau_dri.h" - -struct nouveau_winsys { - struct pipe_winsys base; - - struct pipe_screen *pscreen; - - struct pipe_surface *front; -}; - -static INLINE struct nouveau_winsys * -nouveau_winsys(struct pipe_winsys *ws) -{ - return (struct nouveau_winsys *)ws; -} - -static INLINE struct nouveau_winsys * -nouveau_winsys_screen(struct pipe_screen *pscreen) -{ - return nouveau_winsys(pscreen->winsys); -} - -#endif |