diff options
-rw-r--r-- | libdrm/xf86drm.c | 15 | ||||
-rw-r--r-- | libdrm/xf86mm.h | 1 | ||||
-rw-r--r-- | linux-core/drmP.h | 1 | ||||
-rw-r--r-- | linux-core/drm_bo.c | 27 | ||||
-rw-r--r-- | linux-core/drm_compat.c | 5 | ||||
-rw-r--r-- | shared-core/drm.h | 1 |
6 files changed, 0 insertions, 50 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 253ba690..5c799b6d 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -3187,21 +3187,6 @@ int drmMMTakedown(int fd, unsigned memType) return 0; } -int drmMMMaxLockedSize(int fd, unsigned long maxLockedSize) -{ - drm_mm_init_arg_t arg; - - - memset(&arg, 0, sizeof(arg)); - arg.req.op = mm_set_max_pages; - arg.req.p_size = maxLockedSize / getpagesize(); - - if (ioctl(fd, DRM_IOCTL_MM_INIT, &arg)) - return -errno; - - return 0; -} - int drmMMLock(int fd, unsigned memType) { drm_mm_init_arg_t arg; diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h index c3112c90..da868fe5 100644 --- a/libdrm/xf86mm.h +++ b/libdrm/xf86mm.h @@ -198,7 +198,6 @@ extern int drmBOWaitIdle(int fd, drmBO *buf, unsigned hint); extern int drmMMInit(int fd, unsigned long pOffset, unsigned long pSize, unsigned memType); extern int drmMMTakedown(int fd, unsigned memType); -extern int drmMMMaxLockedSize(int fd, unsigned long maxLockedSize); extern int drmMMLock(int fd, unsigned memType); extern int drmMMUnlock(int fd, unsigned memType); 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; diff --git a/shared-core/drm.h b/shared-core/drm.h index 915befba..4a6a370e 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -829,7 +829,6 @@ typedef union drm_mm_init_arg{ struct { enum { mm_init, - mm_set_max_pages, mm_takedown, mm_query, mm_lock, |