summaryrefslogtreecommitdiff
path: root/linux-core/drm_memory.c
diff options
context:
space:
mode:
authorWang Zhenyu <zhenyu.z.wang@intel.com>2007-02-13 16:18:15 +0800
committerWang Zhenyu <zhenyu.z.wang@intel.com>2007-02-13 16:18:15 +0800
commit2a2d72623306de01e620485169721c790167d2b1 (patch)
tree44da708c7f0a6cc39d73bd81d3106c692f734e22 /linux-core/drm_memory.c
parent3234b290585235e3ce7db99dfeb1714ccc1f6697 (diff)
parent5bd13c5e15a14d34356f2363c55b1d4c7ca3269a (diff)
Merge branch 'master' into crestline
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);
}