From 609e3b037526021d20c7cc18b7fed1152206dc68 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 6 Feb 2007 14:20:33 +0100 Subject: Implement a policy for selecting memory types. --- linux-core/i915_buffer.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'linux-core/i915_buffer.c') diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c index cdbe579a..13a3e9bb 100644 --- a/linux-core/i915_buffer.c +++ b/linux-core/i915_buffer.c @@ -97,6 +97,17 @@ int i915_init_mem_type(drm_device_t *dev, uint32_t type, return 0; } +uint32_t i915_evict_flags(drm_device_t *dev, uint32_t type) +{ + switch(type) { + case DRM_BO_MEM_LOCAL: + case DRM_BO_MEM_TT: + return DRM_BO_FLAG_MEM_LOCAL; + default: + return DRM_BO_FLAG_MEM_TT; + } +} + void i915_emit_copy_blit(drm_device_t *dev, uint32_t src_offset, uint32_t dst_offset, -- cgit v1.2.3