summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv40
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-03-19 00:06:15 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-03-19 22:50:42 +1100
commit9575e35807c89c0b8a745671bc2dcd54d96379ff (patch)
treed05c56b1807634eb81d8d5f1c5ed4f0c41b8d492 /src/gallium/drivers/nv40
parent75e714d476eb573a6e06585341ce693434eb237e (diff)
nouveau: pass nvws to nvws->push_* functions, rather than nouveau_channel*
Diffstat (limited to 'src/gallium/drivers/nv40')
-rw-r--r--src/gallium/drivers/nv40/nv40_dma.h66
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.c2
2 files changed, 1 insertions, 67 deletions
diff --git a/src/gallium/drivers/nv40/nv40_dma.h b/src/gallium/drivers/nv40/nv40_dma.h
deleted file mode 100644
index 1fb8267768..0000000000
--- a/src/gallium/drivers/nv40/nv40_dma.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef __NV40_DMA_H__
-#define __NV40_DMA_H__
-
-#include "pipe/nouveau/nouveau_winsys.h"
-
-#define OUT_RING(data) do { \
- (*nv40->nvws->channel->pushbuf->cur++) = (data); \
-} while(0)
-
-#define OUT_RINGp(src,size) do { \
- memcpy(nv40->nvws->channel->pushbuf->cur, (src), (size) * 4); \
- nv40->nvws->channel->pushbuf->cur += (size); \
-} while(0)
-
-#define OUT_RINGf(data) do { \
- union { float v; uint32_t u; } c; \
- c.v = (data); \
- OUT_RING(c.u); \
-} while(0)
-
-#define BEGIN_RING(obj,mthd,size) do { \
- if (nv40->nvws->channel->pushbuf->remaining < ((size) + 1)) \
- nv40->nvws->push_flush(nv40->nvws->channel, ((size) + 1)); \
- OUT_RING((nv40->obj->subc << 13) | ((size) << 18) | (mthd)); \
- nv40->nvws->channel->pushbuf->remaining -= ((size) + 1); \
-} while(0)
-
-#define BEGIN_RING_NI(obj,mthd,size) do { \
- BEGIN_RING(obj, (mthd) | 0x40000000, (size)); \
-} while(0)
-
-#define FIRE_RING() do { \
- nv40->nvws->push_flush(nv40->nvws->channel, 0); \
-} while(0)
-
-#define OUT_RELOC(bo,data,flags,vor,tor) do { \
- nv40->nvws->push_reloc(nv40->nvws->channel, \
- nv40->nvws->channel->pushbuf->cur, \
- (struct nouveau_bo *)(bo), \
- (data), (flags), (vor), (tor)); \
- OUT_RING(0); \
-} while(0)
-
-/* Raw data + flags depending on FB/TT buffer */
-#define OUT_RELOCd(bo,data,flags,vor,tor) do { \
- OUT_RELOC((bo), (data), (flags) | NOUVEAU_BO_OR, (vor), (tor)); \
-} while(0)
-
-/* FB/TT object handle */
-#define OUT_RELOCo(bo,flags) do { \
- OUT_RELOC((bo), 0, (flags) | NOUVEAU_BO_OR, \
- nv40->nvws->channel->vram->handle, \
- nv40->nvws->channel->gart->handle); \
-} while(0)
-
-/* Low 32-bits of offset */
-#define OUT_RELOCl(bo,delta,flags) do { \
- OUT_RELOC((bo), (delta), (flags) | NOUVEAU_BO_LOW, 0, 0); \
-} while(0)
-
-/* High 32-bits of offset */
-#define OUT_RELOCh(bo,delta,flags) do { \
- OUT_RELOC((bo), (delta), (flags) | NOUVEAU_BO_HIGH, 0, 0); \
-} while(0)
-
-#endif
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index 268ca83ce0..bf30fbeca1 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -260,7 +260,7 @@ nv40_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws,
so_emit(nvws, so);
so_ref(NULL, &so);
- nvws->push_flush(nvws->channel, 0);
+ nvws->push_flush(nvws, 0);
screen->pipe.winsys = ws;
screen->pipe.destroy = nv40_screen_destroy;