summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-01-22 11:38:18 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-23 11:56:47 -0500
commit013158221a4c8dee8a75956c77e377b8df4fa372 (patch)
treeee1d4254f36d4d6b71edaaac8e6c687604e74893 /drivers/gpu/nvgpu/gv11b/gr_gv11b.c
parent9f4cf27119199f95a1e33813426d0e9ba76dbf0c (diff)
gpu: nvgpu: skip missing gpc_tpc_count in gr dumps
The gv11b and gm20b gr status reg dumps can get printed so early that this array is null, so don't access it in that case. Commit 946f1e635963d20f1e9f8020024c781448bfeb2d ("gpu: nvgpu: don't read missing gpc_tpc_count in dump") fixed this for gp10b only. Bug 2049965 Change-Id: I9739fd63b5a153f43000d719a5c509e3be5135cf Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1643692 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index 7288284e..61529a01 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -1753,7 +1753,7 @@ int gr_gv11b_dump_gr_status_regs(struct gk20a *g,
1753 gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity3_r())); 1753 gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity3_r()));
1754 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1754 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n",
1755 gk20a_readl(g, gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r())); 1755 gk20a_readl(g, gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r()));
1756 if (gr->gpc_tpc_count[0] == 2) 1756 if (gr->gpc_tpc_count && gr->gpc_tpc_count[0] == 2)
1757 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1757 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n",
1758 gk20a_readl(g, gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r())); 1758 gk20a_readl(g, gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r()));
1759 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1759 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n",
@@ -1768,7 +1768,7 @@ int gr_gv11b_dump_gr_status_regs(struct gk20a *g,
1768 gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_3_r())); 1768 gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_3_r()));
1769 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1769 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n",
1770 gk20a_readl(g, gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r())); 1770 gk20a_readl(g, gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r()));
1771 if (gr->gpc_tpc_count[0] == 2) 1771 if (gr->gpc_tpc_count && gr->gpc_tpc_count[0] == 2)
1772 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1772 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n",
1773 gk20a_readl(g, gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r())); 1773 gk20a_readl(g, gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r()));
1774 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n", 1774 gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n",