summaryrefslogtreecommitdiff
path: root/linux-core/nouveau_drv.c
diff options
context:
space:
mode:
authorJesse Barnes <jesse.barnes@intel.com>2007-11-01 15:27:55 -0700
committerJesse Barnes <jesse.barnes@intel.com>2007-11-01 15:27:55 -0700
commit629c8b0dbf975632473d848f60606baf309f2f3b (patch)
tree9b85064c2673527cb7515af7e356bb47aaa4639f /linux-core/nouveau_drv.c
parent90d8f792794d46d1a8e998856bc7bbe54596114b (diff)
parent5766d81074d6faa7f14b45635765cdb7209597fc (diff)
Merge branch 'master' into modesetting-101
Conflicts: linux-core/Makefile.kernel linux-core/drm_stub.c linux-core/i915_drv.c shared-core/i915_dma.c shared-core/i915_drv.h Fixup suspend/resume conflicts (basically use what's in DRM master for now). Also fix up a few other conflicts that snuck in (i915_dma changes etc.).
Diffstat (limited to 'linux-core/nouveau_drv.c')
-rw-r--r--linux-core/nouveau_drv.c22
1 files changed, 22 insertions, 0 deletions
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,