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

drm/ttm: also export ttm_bo_vm_fault v2

That is needed by at least a cleanup in radeon.

v2: also export ttm_bo_vm_access

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/339353/

authored by

Christian König and committed by
Christian König
20c012b2 4961eb60

+11 -3
+5 -3
drivers/gpu/drm/ttm/ttm_bo_vm.c
··· 308 308 } 309 309 EXPORT_SYMBOL(ttm_bo_vm_fault_reserved); 310 310 311 - static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf) 311 + vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf) 312 312 { 313 313 struct vm_area_struct *vma = vmf->vma; 314 314 pgprot_t prot; ··· 328 328 329 329 return ret; 330 330 } 331 + EXPORT_SYMBOL(ttm_bo_vm_fault); 331 332 332 333 void ttm_bo_vm_open(struct vm_area_struct *vma) 333 334 { ··· 388 387 return len; 389 388 } 390 389 391 - static int ttm_bo_vm_access(struct vm_area_struct *vma, unsigned long addr, 392 - void *buf, int len, int write) 390 + int ttm_bo_vm_access(struct vm_area_struct *vma, unsigned long addr, 391 + void *buf, int len, int write) 393 392 { 394 393 unsigned long offset = (addr) - vma->vm_start; 395 394 struct ttm_buffer_object *bo = vma->vm_private_data; ··· 425 424 426 425 return ret; 427 426 } 427 + EXPORT_SYMBOL(ttm_bo_vm_access); 428 428 429 429 static const struct vm_operations_struct ttm_bo_vm_ops = { 430 430 .fault = ttm_bo_vm_fault,
+6
include/drm/ttm/ttm_bo_api.h
··· 734 734 pgprot_t prot, 735 735 pgoff_t num_prefault); 736 736 737 + vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf); 738 + 737 739 void ttm_bo_vm_open(struct vm_area_struct *vma); 738 740 739 741 void ttm_bo_vm_close(struct vm_area_struct *vma); 742 + 743 + int ttm_bo_vm_access(struct vm_area_struct *vma, unsigned long addr, 744 + void *buf, int len, int write); 745 + 740 746 #endif