diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index c6f4a336..cffc48f5 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include "gr_pri_gk20a.h" | 52 | #include "gr_pri_gk20a.h" |
53 | #include "regops_gk20a.h" | 53 | #include "regops_gk20a.h" |
54 | #include "dbg_gpu_gk20a.h" | 54 | #include "dbg_gpu_gk20a.h" |
55 | #include "debug_gk20a.h" | ||
55 | #include "semaphore_gk20a.h" | 56 | #include "semaphore_gk20a.h" |
56 | 57 | ||
57 | #define BLK_SIZE (256) | 58 | #define BLK_SIZE (256) |
@@ -7322,6 +7323,110 @@ static u32 gr_gk20a_pagepool_default_size(struct gk20a *g) | |||
7322 | return gr_scc_pagepool_total_pages_hwmax_value_v(); | 7323 | return gr_scc_pagepool_total_pages_hwmax_value_v(); |
7323 | } | 7324 | } |
7324 | 7325 | ||
7326 | static int gr_gk20a_dump_gr_status_regs(struct gk20a *g, | ||
7327 | struct gk20a_debug_output *o) | ||
7328 | { | ||
7329 | gk20a_debug_output(o, "NV_PGRAPH_STATUS: 0x%x\n", | ||
7330 | gk20a_readl(g, gr_status_r())); | ||
7331 | gk20a_debug_output(o, "NV_PGRAPH_STATUS1: 0x%x\n", | ||
7332 | gk20a_readl(g, gr_status_1_r())); | ||
7333 | gk20a_debug_output(o, "NV_PGRAPH_STATUS2: 0x%x\n", | ||
7334 | gk20a_readl(g, gr_status_2_r())); | ||
7335 | gk20a_debug_output(o, "NV_PGRAPH_ENGINE_STATUS: 0x%x\n", | ||
7336 | gk20a_readl(g, gr_engine_status_r())); | ||
7337 | gk20a_debug_output(o, "NV_PGRAPH_GRFIFO_STATUS : 0x%x\n", | ||
7338 | gk20a_readl(g, gr_gpfifo_status_r())); | ||
7339 | gk20a_debug_output(o, "NV_PGRAPH_GRFIFO_CONTROL : 0x%x\n", | ||
7340 | gk20a_readl(g, gr_gpfifo_ctl_r())); | ||
7341 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_HOST_INT_STATUS : 0x%x\n", | ||
7342 | gk20a_readl(g, gr_fecs_host_int_status_r())); | ||
7343 | gk20a_debug_output(o, "NV_PGRAPH_EXCEPTION : 0x%x\n", | ||
7344 | gk20a_readl(g, gr_exception_r())); | ||
7345 | gk20a_debug_output(o, "NV_PGRAPH_FECS_INTR : 0x%x\n", | ||
7346 | gk20a_readl(g, gr_fecs_intr_r())); | ||
7347 | gk20a_debug_output(o, "NV_PFIFO_ENGINE_STATUS(GR) : 0x%x\n", | ||
7348 | gk20a_readl(g, fifo_engine_status_r(ENGINE_GR_GK20A))); | ||
7349 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY0: 0x%x\n", | ||
7350 | gk20a_readl(g, gr_activity_0_r())); | ||
7351 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY1: 0x%x\n", | ||
7352 | gk20a_readl(g, gr_activity_1_r())); | ||
7353 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY2: 0x%x\n", | ||
7354 | gk20a_readl(g, gr_activity_2_r())); | ||
7355 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY4: 0x%x\n", | ||
7356 | gk20a_readl(g, gr_activity_4_r())); | ||
7357 | gk20a_debug_output(o, "NV_PGRAPH_PRI_SKED_ACTIVITY: 0x%x\n", | ||
7358 | gk20a_readl(g, gr_pri_sked_activity_r())); | ||
7359 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY0: 0x%x\n", | ||
7360 | gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity0_r())); | ||
7361 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY1: 0x%x\n", | ||
7362 | gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity1_r())); | ||
7363 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY2: 0x%x\n", | ||
7364 | gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity2_r())); | ||
7365 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY3: 0x%x\n", | ||
7366 | gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity3_r())); | ||
7367 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
7368 | gk20a_readl(g, gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r())); | ||
7369 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
7370 | gk20a_readl(g, gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r())); | ||
7371 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY0: 0x%x\n", | ||
7372 | gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_0_r())); | ||
7373 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY1: 0x%x\n", | ||
7374 | gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_1_r())); | ||
7375 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY2: 0x%x\n", | ||
7376 | gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_2_r())); | ||
7377 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY3: 0x%x\n", | ||
7378 | gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_3_r())); | ||
7379 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
7380 | gk20a_readl(g, gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r())); | ||
7381 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
7382 | gk20a_readl(g, gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r())); | ||
7383 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_BECS_BE_ACTIVITY0: 0x%x\n", | ||
7384 | gk20a_readl(g, gr_pri_be0_becs_be_activity0_r())); | ||
7385 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_BECS_BE_ACTIVITY0: 0x%x\n", | ||
7386 | gk20a_readl(g, gr_pri_bes_becs_be_activity0_r())); | ||
7387 | gk20a_debug_output(o, "NV_PGRAPH_PRI_DS_MPIPE_STATUS: 0x%x\n", | ||
7388 | gk20a_readl(g, gr_pri_ds_mpipe_status_r())); | ||
7389 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_GO_IDLE_ON_STATUS: 0x%x\n", | ||
7390 | gk20a_readl(g, gr_pri_fe_go_idle_on_status_r())); | ||
7391 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_GO_IDLE_TIMEOUT : 0x%x\n", | ||
7392 | gk20a_readl(g, gr_fe_go_idle_timeout_r())); | ||
7393 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_GO_IDLE_CHECK : 0x%x\n", | ||
7394 | gk20a_readl(g, gr_pri_fe_go_idle_check_r())); | ||
7395 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_GO_IDLE_INFO : 0x%x\n", | ||
7396 | gk20a_readl(g, gr_pri_fe_go_idle_info_r())); | ||
7397 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TEX_M_TEX_SUBUNITS_STATUS: 0x%x\n", | ||
7398 | gk20a_readl(g, gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r())); | ||
7399 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_STATUS_FE_0: 0x%x\n", | ||
7400 | gk20a_readl(g, gr_fecs_ctxsw_status_fe_0_r())); | ||
7401 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_STATUS_1: 0x%x\n", | ||
7402 | gk20a_readl(g, gr_fecs_ctxsw_status_1_r())); | ||
7403 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_STATUS_GPC_0: 0x%x\n", | ||
7404 | gk20a_readl(g, gr_gpc0_gpccs_ctxsw_status_gpc_0_r())); | ||
7405 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_STATUS_1: 0x%x\n", | ||
7406 | gk20a_readl(g, gr_gpc0_gpccs_ctxsw_status_1_r())); | ||
7407 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_IDLESTATE : 0x%x\n", | ||
7408 | gk20a_readl(g, gr_fecs_ctxsw_idlestate_r())); | ||
7409 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_IDLESTATE : 0x%x\n", | ||
7410 | gk20a_readl(g, gr_gpc0_gpccs_ctxsw_idlestate_r())); | ||
7411 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CURRENT_CTX : 0x%x\n", | ||
7412 | gk20a_readl(g, gr_fecs_current_ctx_r())); | ||
7413 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_NEW_CTX : 0x%x\n", | ||
7414 | gk20a_readl(g, gr_fecs_new_ctx_r())); | ||
7415 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_CROP_STATUS1 : 0x%x\n", | ||
7416 | gk20a_readl(g, gr_pri_be0_crop_status1_r())); | ||
7417 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_CROP_STATUS1 : 0x%x\n", | ||
7418 | gk20a_readl(g, gr_pri_bes_crop_status1_r())); | ||
7419 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_ZROP_STATUS : 0x%x\n", | ||
7420 | gk20a_readl(g, gr_pri_be0_zrop_status_r())); | ||
7421 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_ZROP_STATUS2 : 0x%x\n", | ||
7422 | gk20a_readl(g, gr_pri_be0_zrop_status2_r())); | ||
7423 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_ZROP_STATUS : 0x%x\n", | ||
7424 | gk20a_readl(g, gr_pri_bes_zrop_status_r())); | ||
7425 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_ZROP_STATUS2 : 0x%x\n", | ||
7426 | gk20a_readl(g, gr_pri_bes_zrop_status2_r())); | ||
7427 | return 0; | ||
7428 | } | ||
7429 | |||
7325 | void gk20a_init_gr_ops(struct gpu_ops *gops) | 7430 | void gk20a_init_gr_ops(struct gpu_ops *gops) |
7326 | { | 7431 | { |
7327 | gops->gr.access_smpc_reg = gr_gk20a_access_smpc_reg; | 7432 | gops->gr.access_smpc_reg = gr_gk20a_access_smpc_reg; |
@@ -7362,5 +7467,6 @@ void gk20a_init_gr_ops(struct gpu_ops *gops) | |||
7362 | gops->gr.init_ctx_state = gr_gk20a_init_ctx_state; | 7467 | gops->gr.init_ctx_state = gr_gk20a_init_ctx_state; |
7363 | gops->gr.alloc_gr_ctx = gr_gk20a_alloc_gr_ctx; | 7468 | gops->gr.alloc_gr_ctx = gr_gk20a_alloc_gr_ctx; |
7364 | gops->gr.free_gr_ctx = gr_gk20a_free_gr_ctx; | 7469 | gops->gr.free_gr_ctx = gr_gk20a_free_gr_ctx; |
7470 | gops->gr.dump_gr_regs = gr_gk20a_dump_gr_status_regs; | ||
7365 | } | 7471 | } |
7366 | 7472 | ||