diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu_ivm.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/vgpu_ivm.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_ivm.c b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_ivm.c index 82475cac..90089de8 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_ivm.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_ivm.c | |||
@@ -15,8 +15,11 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <nvgpu/vgpu/vgpu_ivm.h> | 17 | #include <nvgpu/vgpu/vgpu_ivm.h> |
18 | |||
18 | #include <linux/tegra-ivc.h> | 19 | #include <linux/tegra-ivc.h> |
19 | 20 | ||
21 | #include "common/linux/os_linux.h" | ||
22 | |||
20 | struct tegra_hv_ivm_cookie *vgpu_ivm_mempool_reserve(unsigned int id) | 23 | struct tegra_hv_ivm_cookie *vgpu_ivm_mempool_reserve(unsigned int id) |
21 | { | 24 | { |
22 | return tegra_hv_mempool_reserve(id); | 25 | return tegra_hv_mempool_reserve(id); |
@@ -36,3 +39,15 @@ u64 vgpu_ivm_get_size(struct tegra_hv_ivm_cookie *cookie) | |||
36 | { | 39 | { |
37 | return cookie->size; | 40 | return cookie->size; |
38 | } | 41 | } |
42 | |||
43 | void *vgpu_ivm_mempool_map(struct tegra_hv_ivm_cookie *cookie) | ||
44 | { | ||
45 | return ioremap_cache(vgpu_ivm_get_ipa(cookie), | ||
46 | vgpu_ivm_get_size(cookie)); | ||
47 | } | ||
48 | |||
49 | void vgpu_ivm_mempool_unmap(struct tegra_hv_ivm_cookie *cookie, | ||
50 | void *addr) | ||
51 | { | ||
52 | iounmap(addr); | ||
53 | } | ||