aboutsummaryrefslogtreecommitdiff
path: root/linux-core/nouveau_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/nouveau_buffer.c')
-rw-r--r--linux-core/nouveau_buffer.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/linux-core/nouveau_buffer.c b/linux-core/nouveau_buffer.c
index 41c50748..1a210e49 100644
--- a/linux-core/nouveau_buffer.c
+++ b/linux-core/nouveau_buffer.c
@@ -230,3 +230,30 @@ void nouveau_flush_ttm(struct drm_ttm *ttm)
}
+static uint32_t nouveau_mem_prios[] = {
+ DRM_BO_MEM_PRIV0,
+ 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_PRIV0,
+ DRM_BO_MEM_VRAM,
+ DRM_BO_MEM_LOCAL
+};
+
+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
+};
+