summaryrefslogtreecommitdiff
path: root/linux-core/radeon_drv.c
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2007-10-28 00:55:27 +0200
committerJerome Glisse <glisse@freedesktop.org>2007-10-28 00:55:27 +0200
commit90d8f792794d46d1a8e998856bc7bbe54596114b (patch)
treeb44d6ad311127ae44457635f3e59e51290a3838a /linux-core/radeon_drv.c
parent343696583c77983ac7689b24cd49529864035cf7 (diff)
parent89d44a1023543a95b429bf72662b5e2308b0a550 (diff)
Merge branch 'radeon-ttm' of git://people.freedesktop.org/~airlied/drm into modesetting-101
Conflicts: linux-core/Makefile.kernel linux-core/drmP.h shared-core/radeon_cp.c shared-core/radeon_drv.h shared-core/radeon_irq.c modified: linux-core/Makefile.kernel modified: linux-core/ati_pcigart.c modified: linux-core/drmP.h new file: linux-core/radeon_buffer.c modified: linux-core/radeon_drv.c new file: linux-core/radeon_fence.c modified: shared-core/radeon_cp.c modified: shared-core/radeon_drm.h modified: shared-core/radeon_drv.h modified: shared-core/radeon_irq.c modified: tests/ttmtest/src/ttmtest.c
Diffstat (limited to 'linux-core/radeon_drv.c')
-rw-r--r--linux-core/radeon_drv.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/linux-core/radeon_drv.c b/linux-core/radeon_drv.c
index 327a6a97..107d71a1 100644
--- a/linux-core/radeon_drv.c
+++ b/linux-core/radeon_drv.c
@@ -56,6 +56,38 @@ static struct pci_device_id pciidlist[] = {
radeon_PCI_IDS
};
+
+#ifdef RADEON_HAVE_FENCE
+static struct drm_fence_driver radeon_fence_driver = {
+ .num_classes = 1,
+ .wrap_diff = (1 << 30),
+ .flush_diff = (1 << 29),
+ .sequence_mask = 0xffffffffU,
+ .lazy_capable = 1,
+ .emit = radeon_fence_emit_sequence,
+ .poke_flush = radeon_poke_flush,
+ .has_irq = radeon_fence_has_irq,
+};
+#endif
+#ifdef RADEON_HAVE_BUFFER
+
+static uint32_t radeon_mem_prios[] = {DRM_BO_MEM_VRAM, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL};
+static uint32_t radeon_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_VRAM, DRM_BO_MEM_LOCAL};
+
+static struct drm_bo_driver radeon_bo_driver = {
+ .mem_type_prio = radeon_mem_prios,
+ .mem_busy_prio = radeon_busy_prios,
+ .num_mem_type_prio = sizeof(radeon_mem_prios)/sizeof(uint32_t),
+ .num_mem_busy_prio = sizeof(radeon_busy_prios)/sizeof(uint32_t),
+ .create_ttm_backend_entry = radeon_create_ttm_backend_entry,
+ .fence_type = radeon_fence_types,
+ .invalidate_caches = radeon_invalidate_caches,
+ .init_mem_type = radeon_init_mem_type,
+ .evict_mask = radeon_evict_mask,
+ .move = radeon_move,
+};
+#endif
+
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static struct drm_driver driver = {
.driver_features =
@@ -101,6 +133,13 @@ static struct drm_driver driver = {
.remove = __devexit_p(drm_cleanup_pci),
},
+#ifdef RADEON_HAVE_FENCE
+ .fence_driver = &radeon_fence_driver,
+#endif
+#ifdef RADEON_HAVE_BUFFER
+ .bo_driver = &radeon_bo_driver,
+#endif
+
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.date = DRIVER_DATE,