From 2dc2ee7a5aed18b82a1125d8e56a7ef92be18532 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Fri, 2 Nov 2007 19:44:30 -0400 Subject: nouveau: put it all together. --- shared-core/nouveau_drv.h | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'shared-core/nouveau_drv.h') diff --git a/shared-core/nouveau_drv.h b/shared-core/nouveau_drv.h index 41258a50..83836270 100644 --- a/shared-core/nouveau_drv.h +++ b/shared-core/nouveau_drv.h @@ -39,12 +39,6 @@ #define NOUVEAU_FAMILY 0x0000FFFF #define NOUVEAU_FLAGS 0xFFFF0000 -#if 0 -#if defined(__linux__) -#define NOUVEAU_HAVE_BUFFER -#endif -#endif - #include "nouveau_drm.h" #include "nouveau_reg.h" @@ -153,6 +147,9 @@ struct nouveau_drm_channel { /* Notifiers */ uint32_t notify0_offset; + /* Fences */ + uint32_t next_sequence; + /* Buffer moves */ uint32_t m2mf_dma_source; uint32_t m2mf_dma_destin; @@ -560,16 +557,12 @@ extern void nv04_timer_takedown(struct drm_device *); extern long nouveau_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg); -#ifdef NOUVEAU_HAVE_BUFFER /* nouveau_buffer.c */ -extern struct drm_ttm_backend *nouveau_create_ttm_backend_entry(struct drm_device *dev); -extern int nouveau_fence_types(struct drm_buffer_object *bo, uint32_t *fclass, uint32_t *type); -extern int nouveau_invalidate_caches(struct drm_device *dev, uint64_t buffer_flags); -extern int nouveau_init_mem_type(struct drm_device *dev, uint32_t type, struct drm_mem_type_manager *man); -extern uint32_t nouveau_evict_mask(struct drm_buffer_object *bo); -extern int nouveau_move(struct drm_buffer_object *bo, int evict, int no_wait, struct drm_bo_mem_reg *new_mem); -void nouveau_flush_ttm(struct drm_ttm *ttm); -#endif +extern struct drm_bo_driver nouveau_bo_driver; + +/* nouveau_fence.c */ +extern struct drm_fence_driver nouveau_fence_driver; +extern void nouveau_fence_handler(struct drm_device *dev, int channel); #if defined(__powerpc__) #define NV_READ(reg) in_be32((void __iomem *)(dev_priv->mmio)->handle + (reg) ) -- cgit v1.2.3 From 9a999e57af4a3f5a863c21154dd3b9618888c1f7 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 5 Nov 2007 00:01:38 +1100 Subject: nouveau: crappy ttm mm init, disabled for now. --- shared-core/nouveau_drv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shared-core/nouveau_drv.h') diff --git a/shared-core/nouveau_drv.h b/shared-core/nouveau_drv.h index 83836270..d35d670d 100644 --- a/shared-core/nouveau_drv.h +++ b/shared-core/nouveau_drv.h @@ -42,7 +42,6 @@ #include "nouveau_drm.h" #include "nouveau_reg.h" - struct mem_block { struct mem_block *next; struct mem_block *prev; @@ -229,6 +228,8 @@ struct drm_nouveau_private { NOUVEAU_CARD_INIT_FAILED } init_state; + int ttm; + /* the card type, takes NV_* as values */ int card_type; /* exact chipset, derived from NV_PMC_BOOT_0 */ @@ -348,6 +349,7 @@ extern struct mem_block* nouveau_mem_alloc(struct drm_device *, int flags, struct drm_file *); extern void nouveau_mem_free(struct drm_device *dev, struct mem_block*); extern int nouveau_mem_init(struct drm_device *); +extern int nouveau_mem_init_ttm(struct drm_device *); extern void nouveau_mem_close(struct drm_device *); /* nouveau_notifier.c */ -- cgit v1.2.3 From 0a2ab1a9003f132195fe70c145a78b4079a3fb7f Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 5 Nov 2007 03:53:46 +1100 Subject: nouveau: cleanups --- shared-core/nouveau_drv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'shared-core/nouveau_drv.h') diff --git a/shared-core/nouveau_drv.h b/shared-core/nouveau_drv.h index d35d670d..b881bead 100644 --- a/shared-core/nouveau_drv.h +++ b/shared-core/nouveau_drv.h @@ -106,6 +106,9 @@ struct nouveau_channel /* mapping of the regs controling the fifo */ drm_local_map_t *regs; + /* Fencing */ + uint32_t next_sequence; + /* DMA push buffer */ struct nouveau_gpuobj_ref *pushbuf; struct mem_block *pushbuf_mem; @@ -146,9 +149,6 @@ struct nouveau_drm_channel { /* Notifiers */ uint32_t notify0_offset; - /* Fences */ - uint32_t next_sequence; - /* Buffer moves */ uint32_t m2mf_dma_source; uint32_t m2mf_dma_destin; -- cgit v1.2.3 From 7f6bf84c238a1859ffd409c0ef1f1ca7eb5e6e72 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 5 Nov 2007 12:42:22 +1000 Subject: drm: remove lots of spurious whitespace. Kernel "cleanfile" script run. --- shared-core/nouveau_drv.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'shared-core/nouveau_drv.h') diff --git a/shared-core/nouveau_drv.h b/shared-core/nouveau_drv.h index b881bead..8b00726b 100644 --- a/shared-core/nouveau_drv.h +++ b/shared-core/nouveau_drv.h @@ -59,7 +59,7 @@ enum nouveau_flags { }; #define NVOBJ_ENGINE_SW 0 -#define NVOBJ_ENGINE_GR 1 +#define NVOBJ_ENGINE_GR 1 #define NVOBJ_ENGINE_INT 0xdeadbeef #define NVOBJ_FLAG_ALLOW_NO_REFS (1 << 0) @@ -587,4 +587,3 @@ extern void nouveau_fence_handler(struct drm_device *dev, int channel); #define INSTANCE_WR(o,i,v) NV_WI32((o)->im_pramin->start + ((i)<<2), (v)) #endif /* __NOUVEAU_DRV_H__ */ - -- cgit v1.2.3