diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c index 2a7cfdb3..9b82ba8f 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c | |||
@@ -290,8 +290,7 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g) | |||
290 | 290 | ||
291 | /* bar1 va */ | 291 | /* bar1 va */ |
292 | if (g->ops.mm.is_bar1_supported(g)) { | 292 | if (g->ops.mm.is_bar1_supported(g)) { |
293 | f->userd.gpu_va = vgpu_bar1_map(g, &f->userd.priv.sgt, | 293 | f->userd.gpu_va = vgpu_bar1_map(g, &f->userd); |
294 | f->userd.size); | ||
295 | if (!f->userd.gpu_va) { | 294 | if (!f->userd.gpu_va) { |
296 | nvgpu_err(g, "gmmu mapping failed"); | 295 | nvgpu_err(g, "gmmu mapping failed"); |
297 | goto clean_up; | 296 | goto clean_up; |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c index 7290c9df..7d73594d 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c | |||
@@ -157,9 +157,9 @@ void vgpu_vm_remove(struct vm_gk20a *vm) | |||
157 | WARN_ON(err || msg.ret); | 157 | WARN_ON(err || msg.ret); |
158 | } | 158 | } |
159 | 159 | ||
160 | u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) | 160 | u64 vgpu_bar1_map(struct gk20a *g, struct nvgpu_mem *mem) |
161 | { | 161 | { |
162 | u64 addr = nvgpu_mem_get_addr_sgl(g, (*sgt)->sgl); | 162 | u64 addr = nvgpu_mem_get_addr(g, mem); |
163 | struct tegra_vgpu_cmd_msg msg; | 163 | struct tegra_vgpu_cmd_msg msg; |
164 | struct tegra_vgpu_as_map_params *p = &msg.params.as_map; | 164 | struct tegra_vgpu_as_map_params *p = &msg.params.as_map; |
165 | int err; | 165 | int err; |
@@ -167,7 +167,7 @@ u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) | |||
167 | msg.cmd = TEGRA_VGPU_CMD_MAP_BAR1; | 167 | msg.cmd = TEGRA_VGPU_CMD_MAP_BAR1; |
168 | msg.handle = vgpu_get_handle(g); | 168 | msg.handle = vgpu_get_handle(g); |
169 | p->addr = addr; | 169 | p->addr = addr; |
170 | p->size = size; | 170 | p->size = mem->size; |
171 | p->iova = 0; | 171 | p->iova = 0; |
172 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); | 172 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); |
173 | if (err || msg.ret) | 173 | if (err || msg.ret) |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h index be999930..eafe503c 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h +++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h | |||
@@ -24,6 +24,7 @@ struct tegra_vgpu_gr_intr_info; | |||
24 | struct tegra_vgpu_fifo_intr_info; | 24 | struct tegra_vgpu_fifo_intr_info; |
25 | struct tegra_vgpu_cmd_msg; | 25 | struct tegra_vgpu_cmd_msg; |
26 | struct gk20a_platform; | 26 | struct gk20a_platform; |
27 | struct nvgpu_mem; | ||
27 | 28 | ||
28 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | 29 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION |
29 | #include <nvgpu/vgpu/vgpu_ivc.h> | 30 | #include <nvgpu/vgpu/vgpu_ivc.h> |
@@ -69,7 +70,7 @@ int vgpu_pm_prepare_poweroff(struct device *dev); | |||
69 | int vgpu_pm_finalize_poweron(struct device *dev); | 70 | int vgpu_pm_finalize_poweron(struct device *dev); |
70 | int vgpu_probe(struct platform_device *dev); | 71 | int vgpu_probe(struct platform_device *dev); |
71 | int vgpu_remove(struct platform_device *dev); | 72 | int vgpu_remove(struct platform_device *dev); |
72 | u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size); | 73 | u64 vgpu_bar1_map(struct gk20a *g, struct nvgpu_mem *mem); |
73 | int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info); | 74 | int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info); |
74 | int vgpu_gr_nonstall_isr(struct gk20a *g, | 75 | int vgpu_gr_nonstall_isr(struct gk20a *g, |
75 | struct tegra_vgpu_gr_nonstall_intr_info *info); | 76 | struct tegra_vgpu_gr_nonstall_intr_info *info); |
@@ -125,8 +126,7 @@ static inline int vgpu_remove(struct platform_device *dev) | |||
125 | { | 126 | { |
126 | return -ENOSYS; | 127 | return -ENOSYS; |
127 | } | 128 | } |
128 | static inline u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, | 129 | static inline u64 vgpu_bar1_map(struct gk20a *g, struct nvgpu_mem *mem) |
129 | u64 size) | ||
130 | { | 130 | { |
131 | return 0; | 131 | return 0; |
132 | } | 132 | } |