mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: gp10b: dump GR status registers
Add function pointer gr_gp10b_dump_gr_status_regs() which will enable dumping GR status registers for gp10b Bug 200062436 Change-Id: Iaecc2f9c9364232079bb03e114f68550bd035372 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/678832 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "gm20b/gr_gm20b.h" /* for MAXWELL classes */
|
||||
#include "gp10b/gr_gp10b.h"
|
||||
#include "hw_gr_gp10b.h"
|
||||
#include "hw_fifo_gp10b.h"
|
||||
#include "hw_proj_gp10b.h"
|
||||
#include "hw_ctxsw_prog_gp10b.h"
|
||||
|
||||
@@ -692,6 +693,124 @@ static void gr_gp10b_update_ctxsw_preemption_mode(struct gk20a *g,
|
||||
gk20a_dbg_fn("done");
|
||||
}
|
||||
|
||||
static int gr_gp10b_dump_gr_status_regs(struct gk20a *g,
|
||||
struct gk20a_debug_output *o)
|
||||
{
|
||||
struct gr_gk20a *gr = &g->gr;
|
||||
|
||||
gk20a_debug_output(o, "NV_PGRAPH_STATUS: 0x%x\n",
|
||||
gk20a_readl(g, gr_status_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_STATUS1: 0x%x\n",
|
||||
gk20a_readl(g, gr_status_1_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_STATUS2: 0x%x\n",
|
||||
gk20a_readl(g, gr_status_2_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_ENGINE_STATUS: 0x%x\n",
|
||||
gk20a_readl(g, gr_engine_status_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_GRFIFO_STATUS : 0x%x\n",
|
||||
gk20a_readl(g, gr_gpfifo_status_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_GRFIFO_CONTROL : 0x%x\n",
|
||||
gk20a_readl(g, gr_gpfifo_ctl_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_HOST_INT_STATUS : 0x%x\n",
|
||||
gk20a_readl(g, gr_fecs_host_int_status_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_EXCEPTION : 0x%x\n",
|
||||
gk20a_readl(g, gr_exception_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_FECS_INTR : 0x%x\n",
|
||||
gk20a_readl(g, gr_fecs_intr_r()));
|
||||
gk20a_debug_output(o, "NV_PFIFO_ENGINE_STATUS(GR) : 0x%x\n",
|
||||
gk20a_readl(g, fifo_engine_status_r(ENGINE_GR_GK20A)));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_activity_0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY1: 0x%x\n",
|
||||
gk20a_readl(g, gr_activity_1_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY2: 0x%x\n",
|
||||
gk20a_readl(g, gr_activity_2_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY4: 0x%x\n",
|
||||
gk20a_readl(g, gr_activity_4_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_SKED_ACTIVITY: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_sked_activity_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY1: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity1_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY2: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity2_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY3: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity3_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r()));
|
||||
if (gr->gpc_tpc_count[0] == 2)
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY1: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_1_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY2: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_2_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY3: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_3_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r()));
|
||||
if (gr->gpc_tpc_count[0] == 2)
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_BECS_BE_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_be0_becs_be_activity0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BE1_BECS_BE_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_be1_becs_be_activity0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_BECS_BE_ACTIVITY0: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_bes_becs_be_activity0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_DS_MPIPE_STATUS: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_ds_mpipe_status_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_GO_IDLE_TIMEOUT : 0x%x\n",
|
||||
gk20a_readl(g, gr_fe_go_idle_timeout_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_GO_IDLE_INFO : 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_fe_go_idle_info_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TEX_M_TEX_SUBUNITS_STATUS: 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_CWD_FS: 0x%x\n",
|
||||
gk20a_readl(g, gr_cwd_fs_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_TPC_FS: 0x%x\n",
|
||||
gk20a_readl(g, gr_fe_tpc_fs_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_CWD_GPC_TPC_ID(0): 0x%x\n",
|
||||
gk20a_readl(g, gr_cwd_gpc_tpc_id_r(0)));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_CWD_SM_ID(0): 0x%x\n",
|
||||
gk20a_readl(g, gr_cwd_sm_id_r(0)));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_STATUS_FE_0: 0x%x\n",
|
||||
gk20a_readl(g, gr_fecs_ctxsw_status_fe_0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_STATUS_1: 0x%x\n",
|
||||
gk20a_readl(g, gr_fecs_ctxsw_status_1_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_STATUS_GPC_0: 0x%x\n",
|
||||
gk20a_readl(g, gr_gpc0_gpccs_ctxsw_status_gpc_0_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_STATUS_1: 0x%x\n",
|
||||
gk20a_readl(g, gr_gpc0_gpccs_ctxsw_status_1_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_IDLESTATE : 0x%x\n",
|
||||
gk20a_readl(g, gr_fecs_ctxsw_idlestate_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_IDLESTATE : 0x%x\n",
|
||||
gk20a_readl(g, gr_gpc0_gpccs_ctxsw_idlestate_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CURRENT_CTX : 0x%x\n",
|
||||
gk20a_readl(g, gr_fecs_current_ctx_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_NEW_CTX : 0x%x\n",
|
||||
gk20a_readl(g, gr_fecs_new_ctx_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_CROP_STATUS1 : 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_be0_crop_status1_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_CROP_STATUS1 : 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_bes_crop_status1_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_ZROP_STATUS : 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_be0_zrop_status_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_ZROP_STATUS2 : 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_be0_zrop_status2_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_ZROP_STATUS : 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_bes_zrop_status_r()));
|
||||
gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_ZROP_STATUS2 : 0x%x\n",
|
||||
gk20a_readl(g, gr_pri_bes_zrop_status2_r()));
|
||||
return 0;
|
||||
}
|
||||
|
||||
void gp10b_init_gr(struct gpu_ops *gops)
|
||||
{
|
||||
gm20b_init_gr(gops);
|
||||
@@ -714,4 +833,5 @@ void gp10b_init_gr(struct gpu_ops *gops)
|
||||
gops->gr.free_gr_ctx = gr_gp10b_free_gr_ctx;
|
||||
gops->gr.update_ctxsw_preemption_mode =
|
||||
gr_gp10b_update_ctxsw_preemption_mode;
|
||||
gops->gr.dump_gr_regs = gr_gp10b_dump_gr_status_regs;
|
||||
}
|
||||
|
||||
@@ -222,6 +222,10 @@ static inline u32 gr_gpfifo_ctl_semaphore_access_enabled_f(void)
|
||||
{
|
||||
return 0x10000;
|
||||
}
|
||||
static inline u32 gr_gpfifo_status_r(void)
|
||||
{
|
||||
return 0x00400504;
|
||||
}
|
||||
static inline u32 gr_trapped_addr_r(void)
|
||||
{
|
||||
return 0x00400704;
|
||||
@@ -266,6 +270,14 @@ static inline u32 gr_status_mask_r(void)
|
||||
{
|
||||
return 0x00400610;
|
||||
}
|
||||
static inline u32 gr_status_1_r(void)
|
||||
{
|
||||
return 0x00400604;
|
||||
}
|
||||
static inline u32 gr_status_2_r(void)
|
||||
{
|
||||
return 0x00400608;
|
||||
}
|
||||
static inline u32 gr_engine_status_r(void)
|
||||
{
|
||||
return 0x0040060c;
|
||||
@@ -274,6 +286,130 @@ static inline u32 gr_engine_status_value_busy_f(void)
|
||||
{
|
||||
return 0x1;
|
||||
}
|
||||
static inline u32 gr_activity_0_r(void)
|
||||
{
|
||||
return 0x00400380;
|
||||
}
|
||||
static inline u32 gr_activity_1_r(void)
|
||||
{
|
||||
return 0x00400384;
|
||||
}
|
||||
static inline u32 gr_activity_2_r(void)
|
||||
{
|
||||
return 0x00400388;
|
||||
}
|
||||
static inline u32 gr_activity_4_r(void)
|
||||
{
|
||||
return 0x00400390;
|
||||
}
|
||||
static inline u32 gr_pri_sked_activity_r(void)
|
||||
{
|
||||
return 0x00407054;
|
||||
}
|
||||
static inline u32 gr_pri_gpc0_gpccs_gpc_activity0_r(void)
|
||||
{
|
||||
return 0x00502c80;
|
||||
}
|
||||
static inline u32 gr_pri_gpc0_gpccs_gpc_activity1_r(void)
|
||||
{
|
||||
return 0x00502c84;
|
||||
}
|
||||
static inline u32 gr_pri_gpc0_gpccs_gpc_activity2_r(void)
|
||||
{
|
||||
return 0x00502c88;
|
||||
}
|
||||
static inline u32 gr_pri_gpc0_gpccs_gpc_activity3_r(void)
|
||||
{
|
||||
return 0x00502c8c;
|
||||
}
|
||||
static inline u32 gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r(void)
|
||||
{
|
||||
return 0x00504500;
|
||||
}
|
||||
static inline u32 gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r(void)
|
||||
{
|
||||
return 0x00504d00;
|
||||
}
|
||||
static inline u32 gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r(void)
|
||||
{
|
||||
return 0x00501d00;
|
||||
}
|
||||
static inline u32 gr_pri_gpcs_gpccs_gpc_activity_0_r(void)
|
||||
{
|
||||
return 0x0041ac80;
|
||||
}
|
||||
static inline u32 gr_pri_gpcs_gpccs_gpc_activity_1_r(void)
|
||||
{
|
||||
return 0x0041ac84;
|
||||
}
|
||||
static inline u32 gr_pri_gpcs_gpccs_gpc_activity_2_r(void)
|
||||
{
|
||||
return 0x0041ac88;
|
||||
}
|
||||
static inline u32 gr_pri_gpcs_gpccs_gpc_activity_3_r(void)
|
||||
{
|
||||
return 0x0041ac8c;
|
||||
}
|
||||
static inline u32 gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r(void)
|
||||
{
|
||||
return 0x0041c500;
|
||||
}
|
||||
static inline u32 gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r(void)
|
||||
{
|
||||
return 0x0041cd00;
|
||||
}
|
||||
static inline u32 gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r(void)
|
||||
{
|
||||
return 0x00419d00;
|
||||
}
|
||||
static inline u32 gr_pri_be0_becs_be_activity0_r(void)
|
||||
{
|
||||
return 0x00410200;
|
||||
}
|
||||
static inline u32 gr_pri_be1_becs_be_activity0_r(void)
|
||||
{
|
||||
return 0x00410600;
|
||||
}
|
||||
static inline u32 gr_pri_bes_becs_be_activity0_r(void)
|
||||
{
|
||||
return 0x00408a00;
|
||||
}
|
||||
static inline u32 gr_pri_ds_mpipe_status_r(void)
|
||||
{
|
||||
return 0x00405858;
|
||||
}
|
||||
static inline u32 gr_pri_fe_go_idle_info_r(void)
|
||||
{
|
||||
return 0x00404194;
|
||||
}
|
||||
static inline u32 gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r(void)
|
||||
{
|
||||
return 0x00504238;
|
||||
}
|
||||
static inline u32 gr_pri_be0_crop_status1_r(void)
|
||||
{
|
||||
return 0x00410134;
|
||||
}
|
||||
static inline u32 gr_pri_bes_crop_status1_r(void)
|
||||
{
|
||||
return 0x00408934;
|
||||
}
|
||||
static inline u32 gr_pri_be0_zrop_status_r(void)
|
||||
{
|
||||
return 0x00410048;
|
||||
}
|
||||
static inline u32 gr_pri_be0_zrop_status2_r(void)
|
||||
{
|
||||
return 0x0041004c;
|
||||
}
|
||||
static inline u32 gr_pri_bes_zrop_status_r(void)
|
||||
{
|
||||
return 0x00408848;
|
||||
}
|
||||
static inline u32 gr_pri_bes_zrop_status2_r(void)
|
||||
{
|
||||
return 0x0040884c;
|
||||
}
|
||||
static inline u32 gr_pipe_bundle_address_r(void)
|
||||
{
|
||||
return 0x00400200;
|
||||
@@ -1062,6 +1198,26 @@ static inline u32 gr_fecs_arb_ctx_cmd_cmd_v(u32 r)
|
||||
{
|
||||
return (r >> 0) & 0x1f;
|
||||
}
|
||||
static inline u32 gr_fecs_ctxsw_status_fe_0_r(void)
|
||||
{
|
||||
return 0x00409c00;
|
||||
}
|
||||
static inline u32 gr_gpc0_gpccs_ctxsw_status_gpc_0_r(void)
|
||||
{
|
||||
return 0x00502c04;
|
||||
}
|
||||
static inline u32 gr_gpc0_gpccs_ctxsw_status_1_r(void)
|
||||
{
|
||||
return 0x00502400;
|
||||
}
|
||||
static inline u32 gr_fecs_ctxsw_idlestate_r(void)
|
||||
{
|
||||
return 0x00409420;
|
||||
}
|
||||
static inline u32 gr_gpc0_gpccs_ctxsw_idlestate_r(void)
|
||||
{
|
||||
return 0x00502420;
|
||||
}
|
||||
static inline u32 gr_rstr2d_gpc_map0_r(void)
|
||||
{
|
||||
return 0x0040780c;
|
||||
|
||||
Reference in New Issue
Block a user