summaryrefslogtreecommitdiff
path: root/linux-core/i915_drv.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-02-06 14:20:33 +0100
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-02-06 14:20:33 +0100
commit609e3b037526021d20c7cc18b7fed1152206dc68 (patch)
treef5244753ff65773e6079692a832b39ff8fb83be0 /linux-core/i915_drv.c
parent2d962332dea5ed328ae45c6ef7298ea15216b635 (diff)
Implement a policy for selecting memory types.
Diffstat (limited to 'linux-core/i915_drv.c')
-rw-r--r--linux-core/i915_drv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index 64ce3c15..8c39c249 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -50,11 +50,20 @@ static drm_fence_driver_t i915_fence_driver = {
};
#endif
#ifdef I915_HAVE_BUFFER
+
+static uint32_t i915_mem_prios[] = {DRM_BO_MEM_PRIV0, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL};
+static uint32_t i915_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_PRIV0, DRM_BO_MEM_LOCAL};
+
static drm_bo_driver_t i915_bo_driver = {
+ .mem_type_prio = i915_mem_prios,
+ .mem_busy_prio = i915_busy_prios,
+ .num_mem_type_prio = sizeof(i915_mem_prios)/sizeof(uint32_t),
+ .num_mem_busy_prio = sizeof(i915_busy_prios)/sizeof(uint32_t),
.create_ttm_backend_entry = i915_create_ttm_backend_entry,
.fence_type = i915_fence_types,
.invalidate_caches = i915_invalidate_caches,
.init_mem_type = i915_init_mem_type,
+ .evict_flags = i915_evict_flags,
};
#endif