diff options
| author | Ben Skeggs <bskeggs@redhat.com> | 2009-06-03 13:54:43 +1000 | 
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2009-06-05 14:07:23 +1000 | 
| commit | 3d4bfe8c893d016ef43d1ebf28e4607aa1f540a4 (patch) | |
| tree | 5d2f6f2fb4aa712a54b81ce9bd7d8d17f9e2dfa9 /libdrm/nouveau/nouveau_pushbuf.h | |
| parent | 2cb4c64d7310904b354365c2cbc263211e9eb4a1 (diff) | |
nouveau: 0.0.14 + extend bo interface to support subrange mapping
Normal map() should operate as before, and map_range()/map_flush() should
give correct results but lacking any performance difference from map().
Nothing exiting being done here yet, but the interface is a good start.
Diffstat (limited to 'libdrm/nouveau/nouveau_pushbuf.h')
| -rw-r--r-- | libdrm/nouveau/nouveau_pushbuf.h | 23 | 
1 files changed, 20 insertions, 3 deletions
diff --git a/libdrm/nouveau/nouveau_pushbuf.h b/libdrm/nouveau/nouveau_pushbuf.h index 414ad2d8..3c746ed2 100644 --- a/libdrm/nouveau/nouveau_pushbuf.h +++ b/libdrm/nouveau/nouveau_pushbuf.h @@ -41,8 +41,8 @@ nouveau_pushbuf_flush(struct nouveau_channel *, unsigned min);  int  nouveau_pushbuf_emit_reloc(struct nouveau_channel *, void *ptr, -			   struct nouveau_bo *, uint32_t data, uint32_t flags, -			   uint32_t vor, uint32_t tor); +			   struct nouveau_bo *, uint32_t data, uint32_t data2, +			   uint32_t flags, uint32_t vor, uint32_t tor);  /* Push buffer access macros */  static __inline__ void @@ -121,7 +121,16 @@ OUT_RELOC(struct nouveau_channel *chan, struct nouveau_bo *bo,  	  unsigned data, unsigned flags, unsigned vor, unsigned tor)  {  	nouveau_pushbuf_emit_reloc(chan, chan->pushbuf->cur++, bo, -				   data, flags, vor, tor); +				   data, 0, flags, vor, tor); +} + +static __inline__ void +OUT_RELOC2(struct nouveau_channel *chan, struct nouveau_bo *bo, +	   unsigned data, unsigned data2, unsigned flags, +	   unsigned vor, unsigned tor) +{ +	nouveau_pushbuf_emit_reloc(chan, chan->pushbuf->cur++, bo, +				   data, data2, flags, vor, tor);  }  /* Raw data + flags depending on FB/TT buffer */ @@ -149,6 +158,14 @@ OUT_RELOCl(struct nouveau_channel *chan, struct nouveau_bo *bo,  	OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_LOW, 0, 0);  } +/* Low 32-bits of offset + GPU linear access range info */ +static __inline__ void +OUT_RELOCr(struct nouveau_channel *chan, struct nouveau_bo *bo, +	   unsigned delta, unsigned size, unsigned flags) +{ +	OUT_RELOC2(chan, bo, delta, size, flags | NOUVEAU_BO_LOW, 0, 0); +} +  /* High 32-bits of offset */  static __inline__ void  OUT_RELOCh(struct nouveau_channel *chan, struct nouveau_bo *bo,  | 
