From 09fb445878a5f7e74ee4876a57c370577f36f25e Mon Sep 17 00:00:00 2001 From: prsethi Date: Mon, 1 Feb 2021 04:12:42 +0000 Subject: [PATCH] gpu: nvgpu: remove ipa to pa conversion WAR WAR assume 1:1 IPA to PA mapping when hyp_read_ipa_pa_info fails for the syncpt address which falls into syncpt shim aperture. API nvgpu_mem_phys_sgl_ipa_to_pa() is taking care of IPA to PA mapping for the syncpts which makes this WAR invalid. Patch removes the WAR. Bug 200673604 Change-Id: I966711e11c2ff1b5b5dd3f5e09674bea66c5d04b Signed-off-by: prsethi Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2478068 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/soc.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/soc.c b/drivers/gpu/nvgpu/os/linux/soc.c index fe76d3df6..5718f2fba 100644 --- a/drivers/gpu/nvgpu/os/linux/soc.c +++ b/drivers/gpu/nvgpu/os/linux/soc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -81,26 +81,8 @@ static u64 nvgpu_tegra_hv_ipa_pa(struct gk20a *g, u64 ipa, u64 *pa_len) err = hyp_read_ipa_pa_info(&info, platform->vmid, ipa); if (err < 0) { -#ifdef CONFIG_TEGRA_GK20A_NVHOST - /* WAR for bug 2096877 - * hyp_read_ipa_pa_info only looks up RAM mappings. - * assume one to one IPA:PA mapping for syncpt aperture - */ - u64 start = g->syncpt_unit_base; - u64 end = g->syncpt_unit_base + g->syncpt_unit_size; - if ((ipa >= start) && (ipa < end)) { - pa = ipa; - nvgpu_log(g, gpu_dbg_map_v, - "ipa=%llx vmid=%d -> pa=%llx (SYNCPT)\n", - ipa, platform->vmid, pa); - } else { - nvgpu_err(g, "ipa=%llx translation failed vmid=%u err=%d", - ipa, platform->vmid, err); - } -#else nvgpu_err(g, "ipa=%llx translation failed vmid=%u err=%d", ipa, platform->vmid, err); -#endif } else { pa = info.base + info.offset; if (pa_len != NULL) {