aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorFabio M. De Francesco <[email protected]>2022-10-13 21:07:14 +0000
committerAlex Deucher <[email protected]>2022-10-17 21:41:21 +0000
commitcdabbde1ed262090bff45929e1f5c1153ba5003e (patch)
treea7ac73ccc60bc62d6386a600e66da72bc21b031a /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parentdrm/amd/display: Increase frame size limit for display_mode_vba_util_32.o (diff)
downloadkernel-cdabbde1ed262090bff45929e1f5c1153ba5003e.tar.gz
kernel-cdabbde1ed262090bff45929e1f5c1153ba5003e.zip
drm/radeon: Replace kmap() with kmap_local_page()
The use of kmap() is being deprecated in favor of kmap_local_page(). There are two main problems with kmap(): (1) It comes with an overhead as the mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap’s pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page faults, and can be called from any context (including interrupts). It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore, the tasks can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and still valid. Therefore, replace kmap() with kmap_local_page() in radeon_ttm_gtt_read(). Cc: "Venkataramanan, Anirudh" <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Christian König <[email protected]> Suggested-by: Ira Weiny <[email protected]> Signed-off-by: Fabio M. De Francesco <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
0 files changed, 0 insertions, 0 deletions