Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ttm: export functions to allow qxl do its own iomapping

qxl wants to use io mapping like i915 gem does, for now
just export the symbols so the driver can implement atomic
page maps using io mapping.

Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Dave Airlie and committed by
Dave Airlie
afe6804c 97d10331

+13 -4
+9 -4
drivers/gpu/drm/ttm/ttm_bo_util.c
··· 86 86 mutex_lock(&man->io_reserve_mutex); 87 87 return 0; 88 88 } 89 + EXPORT_SYMBOL(ttm_mem_io_lock); 89 90 90 91 void ttm_mem_io_unlock(struct ttm_mem_type_manager *man) 91 92 { ··· 95 94 96 95 mutex_unlock(&man->io_reserve_mutex); 97 96 } 97 + EXPORT_SYMBOL(ttm_mem_io_unlock); 98 98 99 99 static int ttm_mem_io_evict(struct ttm_mem_type_manager *man) 100 100 { ··· 113 111 return 0; 114 112 } 115 113 116 - static int ttm_mem_io_reserve(struct ttm_bo_device *bdev, 117 - struct ttm_mem_reg *mem) 114 + 115 + int ttm_mem_io_reserve(struct ttm_bo_device *bdev, 116 + struct ttm_mem_reg *mem) 118 117 { 119 118 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; 120 119 int ret = 0; ··· 137 134 } 138 135 return ret; 139 136 } 137 + EXPORT_SYMBOL(ttm_mem_io_reserve); 140 138 141 - static void ttm_mem_io_free(struct ttm_bo_device *bdev, 142 - struct ttm_mem_reg *mem) 139 + void ttm_mem_io_free(struct ttm_bo_device *bdev, 140 + struct ttm_mem_reg *mem) 143 141 { 144 142 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; 145 143 ··· 153 149 bdev->driver->io_mem_free(bdev, mem); 154 150 155 151 } 152 + EXPORT_SYMBOL(ttm_mem_io_free); 156 153 157 154 int ttm_mem_io_reserve_vm(struct ttm_buffer_object *bo) 158 155 {
+4
include/drm/ttm/ttm_bo_driver.h
··· 902 902 * ttm_bo_util.c 903 903 */ 904 904 905 + int ttm_mem_io_reserve(struct ttm_bo_device *bdev, 906 + struct ttm_mem_reg *mem); 907 + void ttm_mem_io_free(struct ttm_bo_device *bdev, 908 + struct ttm_mem_reg *mem); 905 909 /** 906 910 * ttm_bo_move_ttm 907 911 *