diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-01-29 01:50:49 -0500 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:52:03 -0500 |
commit | 6cf9d594f01d9de7a602956a15c2aec6ea570b6a (patch) | |
tree | a161a92842ed5a4d443f36628e36785dead080c5 /drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |
parent | 83c223ac56465e72771aca073cc0648230616d18 (diff) |
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>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 90514b82..e3d4b973 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "gm20b/gr_gm20b.h" /* for MAXWELL classes */ | 20 | #include "gm20b/gr_gm20b.h" /* for MAXWELL classes */ |
21 | #include "gp10b/gr_gp10b.h" | 21 | #include "gp10b/gr_gp10b.h" |
22 | #include "hw_gr_gp10b.h" | 22 | #include "hw_gr_gp10b.h" |
23 | #include "hw_fifo_gp10b.h" | ||
23 | #include "hw_proj_gp10b.h" | 24 | #include "hw_proj_gp10b.h" |
24 | #include "hw_ctxsw_prog_gp10b.h" | 25 | #include "hw_ctxsw_prog_gp10b.h" |
25 | 26 | ||
@@ -692,6 +693,124 @@ static void gr_gp10b_update_ctxsw_preemption_mode(struct gk20a *g, | |||
692 | gk20a_dbg_fn("done"); | 693 | gk20a_dbg_fn("done"); |
693 | } | 694 | } |
694 | 695 | ||
696 | static int gr_gp10b_dump_gr_status_regs(struct gk20a *g, | ||
697 | struct gk20a_debug_output *o) | ||
698 | { | ||
699 | struct gr_gk20a *gr = &g->gr; | ||
700 | |||
701 | gk20a_debug_output(o, "NV_PGRAPH_STATUS: 0x%x\n", | ||
702 | gk20a_readl(g, gr_status_r())); | ||
703 | gk20a_debug_output(o, "NV_PGRAPH_STATUS1: 0x%x\n", | ||
704 | gk20a_readl(g, gr_status_1_r())); | ||
705 | gk20a_debug_output(o, "NV_PGRAPH_STATUS2: 0x%x\n", | ||
706 | gk20a_readl(g, gr_status_2_r())); | ||
707 | gk20a_debug_output(o, "NV_PGRAPH_ENGINE_STATUS: 0x%x\n", | ||
708 | gk20a_readl(g, gr_engine_status_r())); | ||
709 | gk20a_debug_output(o, "NV_PGRAPH_GRFIFO_STATUS : 0x%x\n", | ||
710 | gk20a_readl(g, gr_gpfifo_status_r())); | ||
711 | gk20a_debug_output(o, "NV_PGRAPH_GRFIFO_CONTROL : 0x%x\n", | ||
712 | gk20a_readl(g, gr_gpfifo_ctl_r())); | ||
713 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_HOST_INT_STATUS : 0x%x\n", | ||
714 | gk20a_readl(g, gr_fecs_host_int_status_r())); | ||
715 | gk20a_debug_output(o, "NV_PGRAPH_EXCEPTION : 0x%x\n", | ||
716 | gk20a_readl(g, gr_exception_r())); | ||
717 | gk20a_debug_output(o, "NV_PGRAPH_FECS_INTR : 0x%x\n", | ||
718 | gk20a_readl(g, gr_fecs_intr_r())); | ||
719 | gk20a_debug_output(o, "NV_PFIFO_ENGINE_STATUS(GR) : 0x%x\n", | ||
720 | gk20a_readl(g, fifo_engine_status_r(ENGINE_GR_GK20A))); | ||
721 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY0: 0x%x\n", | ||
722 | gk20a_readl(g, gr_activity_0_r())); | ||
723 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY1: 0x%x\n", | ||
724 | gk20a_readl(g, gr_activity_1_r())); | ||
725 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY2: 0x%x\n", | ||
726 | gk20a_readl(g, gr_activity_2_r())); | ||
727 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY4: 0x%x\n", | ||
728 | gk20a_readl(g, gr_activity_4_r())); | ||
729 | gk20a_debug_output(o, "NV_PGRAPH_PRI_SKED_ACTIVITY: 0x%x\n", | ||
730 | gk20a_readl(g, gr_pri_sked_activity_r())); | ||
731 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY0: 0x%x\n", | ||
732 | gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity0_r())); | ||
733 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY1: 0x%x\n", | ||
734 | gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity1_r())); | ||
735 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY2: 0x%x\n", | ||
736 | gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity2_r())); | ||
737 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_GPC_ACTIVITY3: 0x%x\n", | ||
738 | gk20a_readl(g, gr_pri_gpc0_gpccs_gpc_activity3_r())); | ||
739 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
740 | gk20a_readl(g, gr_pri_gpc0_tpc0_tpccs_tpc_activity_0_r())); | ||
741 | if (gr->gpc_tpc_count[0] == 2) | ||
742 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
743 | gk20a_readl(g, gr_pri_gpc0_tpc1_tpccs_tpc_activity_0_r())); | ||
744 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
745 | gk20a_readl(g, gr_pri_gpc0_tpcs_tpccs_tpc_activity_0_r())); | ||
746 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY0: 0x%x\n", | ||
747 | gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_0_r())); | ||
748 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY1: 0x%x\n", | ||
749 | gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_1_r())); | ||
750 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY2: 0x%x\n", | ||
751 | gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_2_r())); | ||
752 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_GPCCS_GPC_ACTIVITY3: 0x%x\n", | ||
753 | gk20a_readl(g, gr_pri_gpcs_gpccs_gpc_activity_3_r())); | ||
754 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC0_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
755 | gk20a_readl(g, gr_pri_gpcs_tpc0_tpccs_tpc_activity_0_r())); | ||
756 | if (gr->gpc_tpc_count[0] == 2) | ||
757 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPC1_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
758 | gk20a_readl(g, gr_pri_gpcs_tpc1_tpccs_tpc_activity_0_r())); | ||
759 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPCS_TPCS_TPCCS_TPC_ACTIVITY0: 0x%x\n", | ||
760 | gk20a_readl(g, gr_pri_gpcs_tpcs_tpccs_tpc_activity_0_r())); | ||
761 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_BECS_BE_ACTIVITY0: 0x%x\n", | ||
762 | gk20a_readl(g, gr_pri_be0_becs_be_activity0_r())); | ||
763 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE1_BECS_BE_ACTIVITY0: 0x%x\n", | ||
764 | gk20a_readl(g, gr_pri_be1_becs_be_activity0_r())); | ||
765 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_BECS_BE_ACTIVITY0: 0x%x\n", | ||
766 | gk20a_readl(g, gr_pri_bes_becs_be_activity0_r())); | ||
767 | gk20a_debug_output(o, "NV_PGRAPH_PRI_DS_MPIPE_STATUS: 0x%x\n", | ||
768 | gk20a_readl(g, gr_pri_ds_mpipe_status_r())); | ||
769 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_GO_IDLE_TIMEOUT : 0x%x\n", | ||
770 | gk20a_readl(g, gr_fe_go_idle_timeout_r())); | ||
771 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_GO_IDLE_INFO : 0x%x\n", | ||
772 | gk20a_readl(g, gr_pri_fe_go_idle_info_r())); | ||
773 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_TPC0_TEX_M_TEX_SUBUNITS_STATUS: 0x%x\n", | ||
774 | gk20a_readl(g, gr_pri_gpc0_tpc0_tex_m_tex_subunits_status_r())); | ||
775 | gk20a_debug_output(o, "NV_PGRAPH_PRI_CWD_FS: 0x%x\n", | ||
776 | gk20a_readl(g, gr_cwd_fs_r())); | ||
777 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FE_TPC_FS: 0x%x\n", | ||
778 | gk20a_readl(g, gr_fe_tpc_fs_r())); | ||
779 | gk20a_debug_output(o, "NV_PGRAPH_PRI_CWD_GPC_TPC_ID(0): 0x%x\n", | ||
780 | gk20a_readl(g, gr_cwd_gpc_tpc_id_r(0))); | ||
781 | gk20a_debug_output(o, "NV_PGRAPH_PRI_CWD_SM_ID(0): 0x%x\n", | ||
782 | gk20a_readl(g, gr_cwd_sm_id_r(0))); | ||
783 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_STATUS_FE_0: 0x%x\n", | ||
784 | gk20a_readl(g, gr_fecs_ctxsw_status_fe_0_r())); | ||
785 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_STATUS_1: 0x%x\n", | ||
786 | gk20a_readl(g, gr_fecs_ctxsw_status_1_r())); | ||
787 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_STATUS_GPC_0: 0x%x\n", | ||
788 | gk20a_readl(g, gr_gpc0_gpccs_ctxsw_status_gpc_0_r())); | ||
789 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_STATUS_1: 0x%x\n", | ||
790 | gk20a_readl(g, gr_gpc0_gpccs_ctxsw_status_1_r())); | ||
791 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CTXSW_IDLESTATE : 0x%x\n", | ||
792 | gk20a_readl(g, gr_fecs_ctxsw_idlestate_r())); | ||
793 | gk20a_debug_output(o, "NV_PGRAPH_PRI_GPC0_GPCCS_CTXSW_IDLESTATE : 0x%x\n", | ||
794 | gk20a_readl(g, gr_gpc0_gpccs_ctxsw_idlestate_r())); | ||
795 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_CURRENT_CTX : 0x%x\n", | ||
796 | gk20a_readl(g, gr_fecs_current_ctx_r())); | ||
797 | gk20a_debug_output(o, "NV_PGRAPH_PRI_FECS_NEW_CTX : 0x%x\n", | ||
798 | gk20a_readl(g, gr_fecs_new_ctx_r())); | ||
799 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_CROP_STATUS1 : 0x%x\n", | ||
800 | gk20a_readl(g, gr_pri_be0_crop_status1_r())); | ||
801 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_CROP_STATUS1 : 0x%x\n", | ||
802 | gk20a_readl(g, gr_pri_bes_crop_status1_r())); | ||
803 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_ZROP_STATUS : 0x%x\n", | ||
804 | gk20a_readl(g, gr_pri_be0_zrop_status_r())); | ||
805 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BE0_ZROP_STATUS2 : 0x%x\n", | ||
806 | gk20a_readl(g, gr_pri_be0_zrop_status2_r())); | ||
807 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_ZROP_STATUS : 0x%x\n", | ||
808 | gk20a_readl(g, gr_pri_bes_zrop_status_r())); | ||
809 | gk20a_debug_output(o, "NV_PGRAPH_PRI_BES_ZROP_STATUS2 : 0x%x\n", | ||
810 | gk20a_readl(g, gr_pri_bes_zrop_status2_r())); | ||
811 | return 0; | ||
812 | } | ||
813 | |||
695 | void gp10b_init_gr(struct gpu_ops *gops) | 814 | void gp10b_init_gr(struct gpu_ops *gops) |
696 | { | 815 | { |
697 | gm20b_init_gr(gops); | 816 | gm20b_init_gr(gops); |
@@ -714,4 +833,5 @@ void gp10b_init_gr(struct gpu_ops *gops) | |||
714 | gops->gr.free_gr_ctx = gr_gp10b_free_gr_ctx; | 833 | gops->gr.free_gr_ctx = gr_gp10b_free_gr_ctx; |
715 | gops->gr.update_ctxsw_preemption_mode = | 834 | gops->gr.update_ctxsw_preemption_mode = |
716 | gr_gp10b_update_ctxsw_preemption_mode; | 835 | gr_gp10b_update_ctxsw_preemption_mode; |
836 | gops->gr.dump_gr_regs = gr_gp10b_dump_gr_status_regs; | ||
717 | } | 837 | } |