summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2017-02-06 04:43:51 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-17 11:43:42 -0400
commit946f1e635963d20f1e9f8020024c781448bfeb2d (patch)
tree9b79486e3842ed507ebc5ae0fcd7c7405b1d0e0a /drivers/gpu/nvgpu/gp10b/gr_gp10b.c
parent7fac794e998ddafee90e1e6ad550ac4da6c85896 (diff)
gpu: nvgpu: don't read missing gpc_tpc_count in dump
The gp10b gr status dump can get printed so early that this array is null, so don't access it in that case. Bug 1853519 Change-Id: I7474a7f7c50f89aea4ef8e9b16cb1644355e415b Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1321119 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/gr_gp10b.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
index c4d097a7..4898502d 100644
--- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
@@ -1260,7 +1260,7 @@ static int gr_gp10b_dump_gr_status_regs(struct gk20a *g,
1260 gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity3_r())); 1260 gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity3_r()));
1261 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1261 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n",
1262 gk20a_readl(g, gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r())); 1262 gk20a_readl(g, gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r()));
1263 if (gr->gpc_tpc_count[0] == 2) 1263 if (gr->gpc_tpc_count && gr->gpc_tpc_count[0] == 2)
1264 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1264 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n",
1265 gk20a_readl(g, gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r())); 1265 gk20a_readl(g, gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r()));
1266 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1266 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n",
@@ -1275,7 +1275,7 @@ static int gr_gp10b_dump_gr_status_regs(struct gk20a *g,
1275 gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_3_r())); 1275 gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_3_r()));
1276 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1276 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n",
1277 gk20a_readl(g, gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r())); 1277 gk20a_readl(g, gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r()));
1278 if (gr->gpc_tpc_count[0] == 2) 1278 if (gr->gpc_tpc_count && gr->gpc_tpc_count[0] == 2)
1279 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1279 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n",
1280 gk20a_readl(g, gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r())); 1280 gk20a_readl(g, gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r()));
1281 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1281 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n",