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 <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2478068
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
prsethi
2021-02-01 04:12:42 +00:00
committed by mobile promotions
parent a1cbe60bc0
commit 09fb445878

View File

@@ -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 * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * 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); err = hyp_read_ipa_pa_info(&info, platform->vmid, ipa);
if (err < 0) { 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", nvgpu_err(g, "ipa=%llx translation failed vmid=%u err=%d",
ipa, platform->vmid, err); ipa, platform->vmid, err);
#endif
} else { } else {
pa = info.base + info.offset; pa = info.base + info.offset;
if (pa_len != NULL) { if (pa_len != NULL) {