diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-12-10 15:47:28 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-12-10 15:50:22 -0800 |
commit | 9583c099b4a08b49e03f7b461c344b6d277fd262 (patch) | |
tree | e3c17d4b9ee2c2a063c3e30e0a650fc0c9b6cfa7 /linux-core/drm_bo_move.c | |
parent | c34539e8bb5568b1d6059abf139dd08e07e84eea (diff) |
Revert "Merge branch 'modesetting-gem'"
This reverts commit 6656db10551bbb8770dd945b6d81d5138521f208.
We really just want the libdrm and ioctl bits, not all the driver
stuff.
Diffstat (limited to 'linux-core/drm_bo_move.c')
-rw-r--r-- | linux-core/drm_bo_move.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/linux-core/drm_bo_move.c b/linux-core/drm_bo_move.c index 7fe12f45..bf0e1b74 100644 --- a/linux-core/drm_bo_move.c +++ b/linux-core/drm_bo_move.c @@ -146,7 +146,6 @@ void drm_mem_reg_iounmap(struct drm_device *dev, struct drm_bo_mem_reg *mem, if (virtual && (man->flags & _DRM_FLAG_NEEDS_IOREMAP)) iounmap(virtual); } -EXPORT_SYMBOL(drm_mem_reg_iounmap); static int drm_copy_io_page(void *dst, void *src, unsigned long page) { @@ -272,77 +271,6 @@ out: } EXPORT_SYMBOL(drm_bo_move_memcpy); -static int drm_memset_io_page(void *dst, unsigned long page) -{ - dst = (void *)((unsigned long)dst + (page << PAGE_SHIFT)); - memset_io(dst, 0, PAGE_SIZE); - return 0; -} - -static int drm_memset_ttm_page(struct drm_ttm *ttm, unsigned long page) -{ - struct page *d = drm_ttm_get_page(ttm, page); - void *dst; - - dst = kmap(d); - if (!dst) - return -ENOMEM; - - memset_io(dst, 0, PAGE_SIZE); - kunmap(d); - return 0; -} - -int drm_bo_move_zero(struct drm_buffer_object *bo, - int evict, int no_wait, struct drm_bo_mem_reg *new_mem) -{ - struct drm_device *dev = bo->dev; - struct drm_mem_type_manager *man = &dev->bm.man[new_mem->mem_type]; - struct drm_ttm *ttm = bo->ttm; - void *new_iomap; - int ret; - struct drm_bo_mem_reg *old_mem = &bo->mem; - uint64_t save_flags = old_mem->flags; - uint64_t save_proposed_flags = old_mem->proposed_flags; - unsigned long i; - unsigned long page; - - ret = drm_mem_reg_ioremap(dev, new_mem, &new_iomap); - if (ret) - goto out; - - if (new_iomap == NULL && ttm == NULL) - goto out2; - - for (i = 0; i < new_mem->num_pages; ++i) { - if (new_iomap == NULL) - ret = drm_memset_ttm_page(ttm, i); - else - ret = drm_memset_io_page(new_iomap, i); - if (ret) - goto out1; - } - mb(); -out2: - drm_bo_free_old_node(bo); - - *old_mem = *new_mem; - new_mem->mm_node = NULL; - old_mem->proposed_flags = save_proposed_flags; - DRM_FLAG_MASKED(save_flags, new_mem->flags, DRM_BO_MASK_MEMTYPE); - - if ((man->flags & _DRM_FLAG_MEMTYPE_FIXED) && (ttm != NULL)) { - drm_ttm_unbind(ttm); - drm_ttm_destroy(ttm); - bo->ttm = NULL; - } -out1: - drm_mem_reg_iounmap(dev, new_mem, new_iomap); -out: - return ret; -} -EXPORT_SYMBOL(drm_bo_move_zero); - /* * Transfer a buffer object's memory and LRU status to a newly * created object. User-space references remains with the old @@ -633,10 +561,6 @@ int drm_bo_kmap(struct drm_buffer_object *bo, unsigned long start_page, if (ret) return ret; - /* clear the clean flags */ - bo->mem.flags &= ~DRM_BO_FLAG_CLEAN; - bo->mem.proposed_flags &= ~DRM_BO_FLAG_CLEAN; - if (bus_size == 0) { return drm_bo_kmap_ttm(bo, start_page, num_pages, map); } else { |