summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-17 20:03:26 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-17 20:03:26 +0200
commitc34faf224b959bf61e4c3eb29c66a12edbd31841 (patch)
treeaefcfbfd8626c661b48f869267cc039c45492f59 /linux-core
parent89b944179856fadf8667587eff142129c2c6b826 (diff)
Remove max number of locked pages check and call, since
that is now handled by the memory accounting.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drmP.h1
-rw-r--r--linux-core/drm_bo.c27
-rw-r--r--linux-core/drm_compat.c5
3 files changed, 0 insertions, 33 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index b10e9881..fab3608f 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -814,7 +814,6 @@ typedef struct drm_buffer_manager{
struct list_head ddestroy;
struct work_struct wq;
uint32_t fence_type;
- unsigned long max_pages;
unsigned long cur_pages;
atomic_t count;
} drm_buffer_manager_t;
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index e8e8a274..b8ee6c15 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -1859,7 +1859,6 @@ int drm_bo_driver_init(drm_device_t * dev)
drm_bo_driver_t *driver = dev->driver->bo_driver;
drm_buffer_manager_t *bm = &dev->bm;
int ret = -EINVAL;
- struct sysinfo si;
mutex_lock(&dev->bm.init_mutex);
mutex_lock(&dev->struct_mutex);
@@ -1880,8 +1879,6 @@ int drm_bo_driver_init(drm_device_t * dev)
bm->nice_mode = 1;
atomic_set(&bm->count, 0);
bm->cur_pages = 0;
- si_meminfo(&si);
- bm->max_pages = si.totalram >> 1;
INIT_LIST_HEAD(&bm->unfenced);
INIT_LIST_HEAD(&bm->ddestroy);
out_unlock:
@@ -1944,30 +1941,6 @@ int drm_mm_init_ioctl(DRM_IOCTL_ARGS)
"Delaying takedown\n", arg.req.mem_type);
}
break;
- case mm_set_max_pages:{
- struct sysinfo si;
- mutex_lock(&dev->bm.init_mutex);
- mutex_lock(&dev->struct_mutex);
- if (arg.req.p_size < bm->cur_pages) {
- DRM_ERROR
- ("Cannot currently decrease max number of "
- "locked pages below the number currently "
- "locked.\n");
- ret = -EINVAL;
- break;
- }
- si_meminfo(&si);
- if (arg.req.p_size > si.totalram) {
- DRM_ERROR
- ("Cannot set max number of locked pages "
- "to %lu since the total number of RAM pages "
- "is %lu.\n", (unsigned long)arg.req.p_size,
- (unsigned long)si.totalram);
- ret = -EINVAL;
- break;
- }
- bm->max_pages = arg.req.p_size;
- }
case mm_lock:
LOCK_TEST_WITH_RETURN(dev, filp);
mutex_lock(&dev->bm.init_mutex);
diff --git a/linux-core/drm_compat.c b/linux-core/drm_compat.c
index 4a035f49..90e53419 100644
--- a/linux-core/drm_compat.c
+++ b/linux-core/drm_compat.c
@@ -234,11 +234,6 @@ struct page *drm_vm_ttm_nopage(struct vm_area_struct *vma,
page = ttm->pages[page_offset];
if (!page) {
- if (bm->cur_pages >= bm->max_pages) {
- DRM_ERROR("Maximum locked page count exceeded\n");
- page = NOPAGE_OOM;
- goto out;
- }
if (drm_alloc_memctl(PAGE_SIZE)) {
page = NOPAGE_OOM;
goto out;