diff options
author | Tan Xiaojun | 2017-12-25 11:43:34 +0800 |
---|---|---|
committer | Alex Deucher | 2018-01-10 15:44:51 -0500 |
commit | e83bf4adf54ad39d85cb58de0b1495c93936f4a2 (patch) | |
tree | 484942a973b923bd7a1fbcc5a8af243bf6f82f03 /drivers/gpu | |
parent | e42b93758bde103b6585ed0af7b37494464ec493 (diff) |
drm/ttm: remove ttm_bo_default_io_mem_pfn
No one will use this function except ttm_bo_io_mem_pfn() now, so move
the calculation of ttm_bo_default_io_mem_pfn() into ttm_bo_io_mem_pfn()
and do some cleanup.
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_vm.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 8e68e70b02b9..08a3c324242e 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -100,7 +100,8 @@ static unsigned long ttm_bo_io_mem_pfn(struct ttm_buffer_object *bo, if (bdev->driver->io_mem_pfn) return bdev->driver->io_mem_pfn(bo, page_offset); - return ttm_bo_default_io_mem_pfn(bo, page_offset); + return ((bo->mem.bus.base + bo->mem.bus.offset) >> PAGE_SHIFT) + + page_offset; } static int ttm_bo_vm_fault(struct vm_fault *vmf) @@ -420,14 +421,6 @@ static struct ttm_buffer_object *ttm_bo_vm_lookup(struct ttm_bo_device *bdev, return bo; } -unsigned long ttm_bo_default_io_mem_pfn(struct ttm_buffer_object *bo, - unsigned long page_offset) -{ - return ((bo->mem.bus.base + bo->mem.bus.offset) >> PAGE_SHIFT) - + page_offset; -} -EXPORT_SYMBOL(ttm_bo_default_io_mem_pfn); - int ttm_bo_mmap(struct file *filp, struct vm_area_struct *vma, struct ttm_bo_device *bdev) { |