summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2016-08-23 13:06:16 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-09-12 19:06:44 -0400
commit24c38aed5913f0007f35f1ff507c099e70862097 (patch)
tree2bc82e0521e6f921abac96d81d04720b8c9983d3 /drivers/gpu
parent2d35eee68f5cec18259a14c6573c172948951194 (diff)
gpu: nvgpu: fix pmu_copy_to_dmem spew
The error check was not taking account of the DMEM address wrap-around JIRA DNVGPU-34 Change-Id: Ibfed5532c3ee785b3061e6837f012939118a7ece Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1206460 (cherry picked from commit 080953c20f91068ccaaa564d9492a1582ffa28fe) Reviewed-on: http://git-master/r/1218297 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/pmu_gk20a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
index 539ad44e..98d6e2df 100644
--- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
@@ -2066,7 +2066,7 @@ void pmu_copy_to_dmem(struct pmu_gk20a *pmu,
2066 2066
2067 data = gk20a_readl(g, pwr_falcon_dmemc_r(port)) & addr_mask; 2067 data = gk20a_readl(g, pwr_falcon_dmemc_r(port)) & addr_mask;
2068 size = ALIGN(size, 4); 2068 size = ALIGN(size, 4);
2069 if (data != dst + size) { 2069 if (data != ((dst + size) & addr_mask)) {
2070 gk20a_err(dev_from_gk20a(g), 2070 gk20a_err(dev_from_gk20a(g),
2071 "copy failed. bytes written %d, expected %d", 2071 "copy failed. bytes written %d, expected %d",
2072 data - dst, size); 2072 data - dst, size);