[PATCH V2 4/7] drm/radeon: Replace kmap() with kmap_local_page()
ira.weiny at intel.com
ira.weiny at intel.com
Mon Jan 24 01:54:06 UTC 2022
From: Ira Weiny <ira.weiny at intel.com>
kmap() is being deprecated and this usage is local to the thread. Use
kmap_local_page() instead.
Signed-off-by: Ira Weiny <ira.weiny at intel.com>
---
drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 11b21d605584..76d7906e1785 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -907,11 +907,11 @@ static ssize_t radeon_ttm_gtt_read(struct file *f, char __user *buf,
page = rdev->gart.pages[p];
if (page) {
- ptr = kmap(page);
+ ptr = kmap_local_page(page);
ptr += off;
r = copy_to_user(buf, ptr, cur_size);
- kunmap(rdev->gart.pages[p]);
+ kunmap_local(ptr);
} else
r = clear_user(buf, cur_size);
--
2.31.1
More information about the amd-gfx
mailing list