diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/soc.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/soc.c b/drivers/gpu/nvgpu/common/linux/soc.c index 22645381..305d8bd9 100644 --- a/drivers/gpu/nvgpu/common/linux/soc.c +++ b/drivers/gpu/nvgpu/common/linux/soc.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -67,8 +67,21 @@ static u64 nvgpu_tegra_hv_ipa_pa(struct gk20a *g, u64 ipa) | |||
67 | 67 | ||
68 | err = hyp_read_ipa_pa_info(&info, platform->vmid, ipa); | 68 | err = hyp_read_ipa_pa_info(&info, platform->vmid, ipa); |
69 | if (err < 0) { | 69 | if (err < 0) { |
70 | nvgpu_err(g, "ipa=%llx translation failed vmid=%u err=%d", | 70 | /* WAR for bug 2096877 |
71 | * hyp_read_ipa_pa_info only looks up RAM mappings. | ||
72 | * assume one to one IPA:PA mapping for syncpt aperture | ||
73 | */ | ||
74 | u64 start = g->syncpt_unit_base; | ||
75 | u64 end = g->syncpt_unit_base + g->syncpt_unit_size; | ||
76 | if ((ipa >= start) && (ipa < end)) { | ||
77 | pa = ipa; | ||
78 | nvgpu_log(g, gpu_dbg_map_v, | ||
79 | "ipa=%llx vmid=%d -> pa=%llx (SYNCPT)\n", | ||
80 | ipa, platform->vmid, pa); | ||
81 | } else { | ||
82 | nvgpu_err(g, "ipa=%llx translation failed vmid=%u err=%d", | ||
71 | ipa, platform->vmid, err); | 83 | ipa, platform->vmid, err); |
84 | } | ||
72 | } else { | 85 | } else { |
73 | pa = info.base + info.offset; | 86 | pa = info.base + info.offset; |
74 | nvgpu_log(g, gpu_dbg_map_v, | 87 | nvgpu_log(g, gpu_dbg_map_v, |