diff options
author | Jeremy Kolb <jkolb@brandeis.edu> | 2007-10-31 20:13:01 -0400 |
---|---|---|
committer | Jeremy Kolb <jkolb@brandeis.edu> | 2007-10-31 20:13:01 -0400 |
commit | 31847b4b62575739a164e019b33ced0531683403 (patch) | |
tree | 00cecaba853247eb2cbe9cda9dfa88ff3c3b617a /linux-core | |
parent | 6b0b2546c29858866ae1986b3b7254551245967e (diff) |
nouveau: ttm stubs
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/Makefile.kernel | 2 | ||||
-rw-r--r-- | linux-core/nouveau_drv.c | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/linux-core/Makefile.kernel b/linux-core/Makefile.kernel index f1ae28e6..bcbd78f2 100644 --- a/linux-core/Makefile.kernel +++ b/linux-core/Makefile.kernel @@ -22,7 +22,7 @@ i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o \ i915_buffer.o i915_compat.o nouveau-objs := nouveau_drv.o nouveau_state.o nouveau_fifo.o nouveau_mem.o \ nouveau_object.o nouveau_irq.o nouveau_notifier.o nouveau_swmthd.o \ - nouveau_sgdma.o nouveau_dma.o \ + nouveau_sgdma.o nouveau_dma.o nouveau_buffer.o \ nv04_timer.o \ nv04_mc.o nv40_mc.o nv50_mc.o \ nv04_fb.o nv10_fb.o nv40_fb.o \ diff --git a/linux-core/nouveau_drv.c b/linux-core/nouveau_drv.c index 01de67de..9e6c8f41 100644 --- a/linux-core/nouveau_drv.c +++ b/linux-core/nouveau_drv.c @@ -41,6 +41,25 @@ static struct pci_device_id pciidlist[] = { } }; +#ifdef NOUVEAU_HAVE_BUFFER +static uint32_t nouveau_mem_prios[] = { DRM_BO_MEM_VRAM, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL }; +static uint32_t nouveau_busy_prios[] = { DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL }; + +static struct drm_bo_driver nouveau_bo_driver = { + .mem_type_prio = nouveau_mem_prios, + .mem_busy_prio = nouveau_busy_prios, + .num_mem_type_prio = sizeof(nouveau_mem_prios)/sizeof(uint32_t), + .num_mem_busy_prio = sizeof(nouveau_busy_prios)/sizeof(uint32_t), + .create_ttm_backend_entry = nouveau_create_ttm_backend_entry, + .fence_type = nouveau_fence_types, + .invalidate_caches = nouveau_invalidate_caches, + .init_mem_type = nouveau_init_mem_type, + .evict_mask = nouveau_evict_mask, + .move = nouveau_move, + .ttm_cache_flush= nouveau_flush_ttm +}; +#endif + extern struct drm_ioctl_desc nouveau_ioctls[]; extern int nouveau_max_ioctl; @@ -80,6 +99,9 @@ static struct drm_driver driver = { .probe = probe, .remove = __devexit_p(drm_cleanup_pci), }, +#ifdef NOUVEAU_HAVE_BUFFER + .bo_driver = &nouveau_bo_driver, +#endif .name = DRIVER_NAME, .desc = DRIVER_DESC, |