summaryrefslogtreecommitdiff
path: root/linux-core/i915_buffer.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_buffer.c
parent2d962332dea5ed328ae45c6ef7298ea15216b635 (diff)
Implement a policy for selecting memory types.
Diffstat (limited to 'linux-core/i915_buffer.c')
-rw-r--r--linux-core/i915_buffer.c11
1 files changed, 11 insertions, 0 deletions
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,