diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c index 5dbc57a4..e8ca9d2f 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/dma-mapping.h> | ||
20 | #include <trace/events/gk20a.h> | 19 | #include <trace/events/gk20a.h> |
21 | #include <uapi/linux/nvgpu.h> | 20 | #include <uapi/linux/nvgpu.h> |
22 | 21 | ||
@@ -149,7 +148,6 @@ int vgpu_channel_setup_ramfc(struct channel_gk20a *ch, u64 gpfifo_base, | |||
149 | unsigned long acquire_timeout, u32 flags) | 148 | unsigned long acquire_timeout, u32 flags) |
150 | { | 149 | { |
151 | struct device __maybe_unused *d = dev_from_gk20a(ch->g); | 150 | struct device __maybe_unused *d = dev_from_gk20a(ch->g); |
152 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(d); | ||
153 | struct tegra_vgpu_cmd_msg msg; | 151 | struct tegra_vgpu_cmd_msg msg; |
154 | struct tegra_vgpu_ramfc_params *p = &msg.params.ramfc; | 152 | struct tegra_vgpu_ramfc_params *p = &msg.params.ramfc; |
155 | int err; | 153 | int err; |
@@ -162,7 +160,7 @@ int vgpu_channel_setup_ramfc(struct channel_gk20a *ch, u64 gpfifo_base, | |||
162 | p->gpfifo_va = gpfifo_base; | 160 | p->gpfifo_va = gpfifo_base; |
163 | p->num_entries = gpfifo_entries; | 161 | p->num_entries = gpfifo_entries; |
164 | p->userd_addr = ch->userd_iova; | 162 | p->userd_addr = ch->userd_iova; |
165 | p->iova = mapping ? 1 : 0; | 163 | p->iova = 0; |
166 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); | 164 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); |
167 | 165 | ||
168 | return (err || msg.ret) ? -ENOMEM : 0; | 166 | return (err || msg.ret) ? -ENOMEM : 0; |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c index d2cb4442..fe6c2e82 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/dma-mapping.h> | ||
20 | #include <uapi/linux/nvgpu.h> | 19 | #include <uapi/linux/nvgpu.h> |
21 | 20 | ||
22 | #include <nvgpu/kmem.h> | 21 | #include <nvgpu/kmem.h> |
@@ -162,8 +161,6 @@ void vgpu_vm_remove(struct vm_gk20a *vm) | |||
162 | 161 | ||
163 | u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) | 162 | u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) |
164 | { | 163 | { |
165 | struct dma_iommu_mapping *mapping = | ||
166 | to_dma_iommu_mapping(dev_from_gk20a(g)); | ||
167 | u64 addr = nvgpu_mem_get_addr_sgl(g, (*sgt)->sgl); | 164 | u64 addr = nvgpu_mem_get_addr_sgl(g, (*sgt)->sgl); |
168 | struct tegra_vgpu_cmd_msg msg; | 165 | struct tegra_vgpu_cmd_msg msg; |
169 | struct tegra_vgpu_as_map_params *p = &msg.params.as_map; | 166 | struct tegra_vgpu_as_map_params *p = &msg.params.as_map; |
@@ -173,7 +170,7 @@ u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) | |||
173 | msg.handle = vgpu_get_handle(g); | 170 | msg.handle = vgpu_get_handle(g); |
174 | p->addr = addr; | 171 | p->addr = addr; |
175 | p->size = size; | 172 | p->size = size; |
176 | p->iova = mapping ? 1 : 0; | 173 | p->iova = 0; |
177 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); | 174 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); |
178 | if (err || msg.ret) | 175 | if (err || msg.ret) |
179 | addr = 0; | 176 | addr = 0; |