diff options
author | Antony Clince Alex <aalex@nvidia.com> | 2018-05-29 05:59:06 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-15 00:41:31 -0400 |
commit | 9751fb0b5405bb283f5bd884115465443f5f8608 (patch) | |
tree | 80df0a6e599e33d9b6e3a7e62dd0792e64b30862 /drivers/gpu/nvgpu/common/linux/vgpu/vgpu_ivm.c | |
parent | d27d9ff7a89ab1a590a9cc8367af7f3a3ea698a8 (diff) |
gpu: nvgpu: vgpu: Unified CSS VGPU HAL
- defined platform agnostic wrapper for mempool
mapping and unmapping.
- used platform agnositc wrapper for device
tree parsing.
- modified css_gr_gk20a to include special
handling incase of rm-server
JIRA: VQRM:3699
Change-Id: I08fd26052edfa1edf45a67be57f7d27c38ad106a
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1733576
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
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 | } | ||