summaryrefslogtreecommitdiff
path: root/linux-core/drm_memory.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-01-25 14:26:58 +0100
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-01-25 14:27:29 +0100
commit582637641abbadc75795ac7e0671e1a5e3b41880 (patch)
tree0df2009a7b164cac50485fd8dd241465f6c299b2 /linux-core/drm_memory.c
parent90ae39d2f07058dd128d2fb19ffad712ee75c9a0 (diff)
Remove a scary error printed when we were leaking memory caches.
We don't use memory caches anymore... Fix memory accounting initialization to only use low or DMA32 memory.
Diffstat (limited to 'linux-core/drm_memory.c')
-rw-r--r--linux-core/drm_memory.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/linux-core/drm_memory.c b/linux-core/drm_memory.c
index 62f54b67..9a53fa82 100644
--- a/linux-core/drm_memory.c
+++ b/linux-core/drm_memory.c
@@ -95,12 +95,13 @@ void drm_query_memctl(drm_u64_t *cur_used,
EXPORT_SYMBOL(drm_query_memctl);
void drm_init_memctl(size_t p_low_threshold,
- size_t p_high_threshold)
+ size_t p_high_threshold,
+ size_t unit_size)
{
spin_lock(&drm_memctl.lock);
drm_memctl.cur_used = 0;
- drm_memctl.low_threshold = p_low_threshold << PAGE_SHIFT;
- drm_memctl.high_threshold = p_high_threshold << PAGE_SHIFT;
+ drm_memctl.low_threshold = p_low_threshold * unit_size;
+ drm_memctl.high_threshold = p_high_threshold * unit_size;
spin_unlock(&drm_memctl.lock);
}