From 582637641abbadc75795ac7e0671e1a5e3b41880 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 25 Jan 2007 14:26:58 +0100 Subject: 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. --- linux-core/drm_memory.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'linux-core/drm_memory.c') 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); } -- cgit v1.2.3