From 6ab28b6ef0676a65623f2cadc10193fb124c11ee Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Wed, 31 Jan 2018 15:24:57 -0800 Subject: gpu: nvgpu: vgpu: remove smmu checkings Currently vgpu always disable smmu. Jira EVLR-2364 Change-Id: I54dfa5ff6bfda56975617ec526d80359bf3cf672 Signed-off-by: Richard Zhao Reviewed-on: https://git-master.nvidia.com/r/1649938 Reviewed-by: Aingara Paramakuru Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Reviewed-by: Nirav Patel Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c | 4 +--- drivers/gpu/nvgpu/common/linux/vgpu/mm_vgpu.c | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'drivers/gpu') 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 @@ * along with this program. If not, see . */ -#include #include #include @@ -149,7 +148,6 @@ int vgpu_channel_setup_ramfc(struct channel_gk20a *ch, u64 gpfifo_base, unsigned long acquire_timeout, u32 flags) { struct device __maybe_unused *d = dev_from_gk20a(ch->g); - struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(d); struct tegra_vgpu_cmd_msg msg; struct tegra_vgpu_ramfc_params *p = &msg.params.ramfc; int err; @@ -162,7 +160,7 @@ int vgpu_channel_setup_ramfc(struct channel_gk20a *ch, u64 gpfifo_base, p->gpfifo_va = gpfifo_base; p->num_entries = gpfifo_entries; p->userd_addr = ch->userd_iova; - p->iova = mapping ? 1 : 0; + p->iova = 0; err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); 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 @@ * along with this program. If not, see . */ -#include #include #include @@ -162,8 +161,6 @@ void vgpu_vm_remove(struct vm_gk20a *vm) u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) { - struct dma_iommu_mapping *mapping = - to_dma_iommu_mapping(dev_from_gk20a(g)); u64 addr = nvgpu_mem_get_addr_sgl(g, (*sgt)->sgl); struct tegra_vgpu_cmd_msg msg; 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) msg.handle = vgpu_get_handle(g); p->addr = addr; p->size = size; - p->iova = mapping ? 1 : 0; + p->iova = 0; err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); if (err || msg.ret) addr = 0; -- cgit v1.2.2