diff options
author | Jon Smirl <[email protected]> | 2004-03-11 20:35:38 +0000 |
---|---|---|
committer | Jon Smirl <[email protected]> | 2004-03-11 20:35:38 +0000 |
commit | ae4a1cc0666860bf5cc37a5cb549afc9aa5448b0 (patch) | |
tree | 495f1f0249dc177e65f956e16ae79f7ab5a0cb83 /src/mesa/drivers/dri/unichrome | |
parent | 157ec8bcf8b56d7951416d9ee13c98b7e82d099d (diff) |
Adjustments to make everything use IOCTL/sarea defines in DRM instead
of glx/mini. removes glx/mini/drm.h glx/mini/sarea.h
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/Makefile.solo | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/server/via_dri.c | 11 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/server/via_driver.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_context.h | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_ioctl.c | 12 |
6 files changed, 16 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/unichrome/Makefile.solo b/src/mesa/drivers/dri/unichrome/Makefile.solo index 8eb7ba04b29..0e1f53a3e36 100644 --- a/src/mesa/drivers/dri/unichrome/Makefile.solo +++ b/src/mesa/drivers/dri/unichrome/Makefile.solo @@ -7,7 +7,7 @@ TOP = ../../../../.. default: linux-solo -SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver +SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver -I../drm/shared MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini DEFINES += \ diff --git a/src/mesa/drivers/dri/unichrome/server/via_dri.c b/src/mesa/drivers/dri/unichrome/server/via_dri.c index d82d7acc733..7ccb62bd066 100644 --- a/src/mesa/drivers/dri/unichrome/server/via_dri.c +++ b/src/mesa/drivers/dri/unichrome/server/via_dri.c @@ -48,7 +48,6 @@ #endif #include "dri_util.h" -#include "sarea.h" #include "via_context.h" #include "via_dri.h" @@ -190,9 +189,9 @@ static int VIADRIScreenInit(DRIDriverContext * ctx) int err; #if 0 - ctx->shared.SAREASize = ((sizeof(XF86DRISAREARec) + 0xfff) & 0x1000); + ctx->shared.SAREASize = ((sizeof(drm_sarea_t) + 0xfff) & 0x1000); #else - if (sizeof(XF86DRISAREARec)+sizeof(VIASAREAPriv) > SAREA_MAX) { + if (sizeof(drm_sarea_t)+sizeof(VIASAREAPriv) > SAREA_MAX) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Data does not fit in SAREA\n"); return FALSE; @@ -356,7 +355,7 @@ VIADRIFinishScreenInit(DRIDriverContext * ctx) VIASAREAPriv *saPriv; saPriv=(VIASAREAPriv*)(((char*)ctx->pSAREA) + - sizeof(XF86DRISAREARec)); + sizeof(drm_sarea_t)); assert(saPriv); memset(saPriv, 0, sizeof(*saPriv)); saPriv->CtxOwner = -1; @@ -367,7 +366,7 @@ VIADRIFinishScreenInit(DRIDriverContext * ctx) pVIADRI->height=ctx->shared.virtualHeight; pVIADRI->mem=ctx->shared.fbSize; pVIADRI->bytesPerPixel= (ctx->bpp+7) / 8; - pVIADRI->sarea_priv_offset = sizeof(XF86DRISAREARec); + pVIADRI->sarea_priv_offset = sizeof(drm_sarea_t); /* TODO */ pVIADRI->scrnX=pVIADRI->width; pVIADRI->scrnY=pVIADRI->height; @@ -380,7 +379,7 @@ static int VIADRIKernelInit(DRIDriverContext * ctx, VIAPtr pVia) { drmVIAInit drmInfo; memset(&drmInfo, 0, sizeof(drmVIAInit)); - drmInfo.sarea_priv_offset = sizeof(XF86DRISAREARec); + drmInfo.sarea_priv_offset = sizeof(drm_sarea_t); drmInfo.fb_offset = pVia->FrameBufferBase; drmInfo.mmio_offset = pVia->registerHandle; if (pVia->IsPCI) diff --git a/src/mesa/drivers/dri/unichrome/server/via_driver.h b/src/mesa/drivers/dri/unichrome/server/via_driver.h index fe7df163cf7..a39af111472 100644 --- a/src/mesa/drivers/dri/unichrome/server/via_driver.h +++ b/src/mesa/drivers/dri/unichrome/server/via_driver.h @@ -77,7 +77,6 @@ #else #include "via_regs.h" -#include "sarea.h" #include "dri.h" #include "via_dri.h" #endif diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index e03f7fed929..80b573e0e51 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -578,7 +578,7 @@ viaCreateContext(const __GLcontextModes *mesaVis, #endif } - vmesa->pSaamRects = (XF86DRIClipRectPtr) malloc(sizeof(XF86DRIClipRectRec)); + vmesa->pSaamRects = (drm_clip_rect_t *) malloc(sizeof(drm_clip_rect_t)); return GL_TRUE; } diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h index 8b5379b8cd0..14123605914 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.h +++ b/src/mesa/drivers/dri/unichrome/via_context.h @@ -268,7 +268,7 @@ struct via_context_t { XineramaScreenInfo *xsi; #endif int drawXoffSaam; - XF86DRIClipRectPtr pSaamRects; + drm_clip_rect_t *pSaamRects; int drawXSaam; int drawYSaam; GLuint numSaamRects; @@ -277,7 +277,7 @@ struct via_context_t { int readPitch; int drawXoff; GLuint numClipRects; /* cliprects for that buffer */ - XF86DRIClipRectPtr pClipRects; + drm_clip_rect_t *pClipRects; int lastSwap; int texAge; @@ -289,7 +289,7 @@ struct via_context_t { drm_clip_rect_t scissorRect; drmContext hHWContext; - drmLock *driHwLock; + drm_hw_lock_t *driHwLock; int driFd; #ifndef _SOLO Display *display; diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c index 9b67b920875..a73df4e0263 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.c +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c @@ -104,7 +104,7 @@ static void viaClear(GLcontext *ctx, GLbitfield mask, GLboolean all, if (vmesa->numClipRects) { int nr = MIN2(i + VIA_NR_SAREA_CLIPRECTS, vmesa->numClipRects); - XF86DRIClipRectRec *box = vmesa->pClipRects; + drm_clip_rect_t *box = vmesa->pClipRects; drm_clip_rect_t *b = vmesa->sarea->boxes; int n = 0; @@ -281,7 +281,7 @@ static void viaClear(GLcontext *ctx, GLbitfield mask, GLboolean all, void viaCopyBuffer(const __DRIdrawablePrivate *dPriv) { viaContextPtr vmesa; - XF86DRIClipRectPtr pbox; + drm_clip_rect_t *pbox; int nbox, i; GLuint scrn = 0, side = 0; #ifdef DEBUG @@ -321,7 +321,7 @@ void viaCopyBuffer(const __DRIdrawablePrivate *dPriv) if (!vmesa->saam) { for (i = 0; i < nbox; ) { int nr = MIN2(i + VIA_NR_SAREA_CLIPRECTS, dPriv->numClipRects); - XF86DRIClipRectRec *b = (XF86DRIClipRectRec *)vmesa->sarea->boxes; + drm_clip_rect_t *b = (drm_clip_rect_t *)vmesa->sarea->boxes; vmesa->sarea->nbox = nr - i; @@ -336,7 +336,7 @@ void viaCopyBuffer(const __DRIdrawablePrivate *dPriv) else if (scrn == S0 || scrn == S1) { for (i = 0; i < nbox; ) { int nr = MIN2(i + VIA_NR_SAREA_CLIPRECTS, vmesa->numClipRects); - XF86DRIClipRectRec *b = (XF86DRIClipRectRec *)vmesa->sarea->boxes; + drm_clip_rect_t *b = (drm_clip_rect_t *)vmesa->sarea->boxes; vmesa->sarea->nbox = nr - i; @@ -350,7 +350,7 @@ void viaCopyBuffer(const __DRIdrawablePrivate *dPriv) else { for (i = 0; i < nbox; ) { int nr = MIN2(i + VIA_NR_SAREA_CLIPRECTS, dPriv->numClipRects); - XF86DRIClipRectRec *b = (XF86DRIClipRectRec *)vmesa->sarea->boxes; + drm_clip_rect_t *b = (drm_clip_rect_t *)vmesa->sarea->boxes; vmesa->sarea->nbox = nr - i; @@ -364,7 +364,7 @@ void viaCopyBuffer(const __DRIdrawablePrivate *dPriv) for (i = 0; i < nbox; ) { int nr = MIN2(i + VIA_NR_SAREA_CLIPRECTS, vmesa->numSaamRects); - XF86DRIClipRectRec *b = (XF86DRIClipRectRec *)vmesa->sarea->boxes; + drm_clip_rect_t *b = (drm_clip_rect_t *)vmesa->sarea->boxes; vmesa->sarea->nbox = nr - i; |