First set in IP dump patches
cover First set in IP dump patches
Adding infrastructure needed for ipdump along
with dumping gfx10 registers.
Sunil Khatri (2):
drm/amdgpu: add prototype to dump ip state
drm/amdgpu: Add support of gfx10 register dump
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 16 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 1 + .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 22 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 1 + drivers/gpu/drm/amd/amdgpu/cik.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 + drivers/gpu/drm/amd/amdgpu/cz_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 142 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 2 + drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/nv.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/si.c | 1 + drivers/gpu/drm/amd/amdgpu/si_dma.c | 1 + drivers/gpu/drm/amd/amdgpu/si_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 + drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vi.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/include/amd_shared.h | 1 + drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 1 + drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 1 + .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 1 + 66 files changed, 245 insertions(+)
Signature · 1 line
2.34.1
PATCH 1/2 drm/amdgpu: add prototype to dump ip state
Add the prototype for all the ips of different
asics and set them to NULL for now and based on
the need will keep adding the function for each
ip eventually.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 1 + drivers/gpu/drm/amd/amdgpu/cik.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 + drivers/gpu/drm/amd/amdgpu/cz_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 2 ++ drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/nv.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/si.c | 1 + drivers/gpu/drm/amd/amdgpu/si_dma.c | 1 + drivers/gpu/drm/amd/amdgpu/si_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vi.c | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/include/amd_shared.h | 1 + drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 1 + drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 1 + drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 1 + 64 files changed, 66 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +1 -0
@@ -637,6 +637,7 @@ static const struct amd_ip_funcs acp_ip_funcs = { .soft_reset = acp_soft_reset, .set_clockgating_state = acp_set_clockgating_state, .set_powergating_state = acp_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version acp_ip_block = {
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +1 -0
@@ -875,6 +875,7 @@ static const struct amd_ip_funcs umsch_mm_v4_0_ip_funcs = { .hw_fini = umsch_mm_hw_fini, .suspend = umsch_mm_suspend, .resume = umsch_mm_resume, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version umsch_mm_v4_0_ip_block = {
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +1 -0
@@ -658,6 +658,7 @@ static const struct amd_ip_funcs amdgpu_vkms_ip_funcs = { .soft_reset = amdgpu_vkms_soft_reset, .set_clockgating_state = amdgpu_vkms_set_clockgating_state, .set_powergating_state = amdgpu_vkms_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version amdgpu_vkms_ip_block = {
drivers/gpu/drm/amd/amdgpu/cik.c +1 -0
@@ -2210,6 +2210,7 @@ static const struct amd_ip_funcs cik_common_ip_funcs = { .soft_reset = cik_common_soft_reset, .set_clockgating_state = cik_common_set_clockgating_state, .set_powergating_state = cik_common_set_powergating_state, + .dump_ip_state = NULL, }; static const struct amdgpu_ip_block_version cik_common_ip_block =
drivers/gpu/drm/amd/amdgpu/cik_ih.c +1 -0
@@ -435,6 +435,7 @@ static const struct amd_ip_funcs cik_ih_ip_funcs = { .soft_reset = cik_ih_soft_reset, .set_clockgating_state = cik_ih_set_clockgating_state, .set_powergating_state = cik_ih_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs cik_ih_funcs = {
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +1 -0
@@ -1228,6 +1228,7 @@ static const struct amd_ip_funcs cik_sdma_ip_funcs = { .soft_reset = cik_sdma_soft_reset, .set_clockgating_state = cik_sdma_set_clockgating_state, .set_powergating_state = cik_sdma_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs cik_sdma_ring_funcs = {
drivers/gpu/drm/amd/amdgpu/cz_ih.c +1 -0
@@ -433,6 +433,7 @@ static const struct amd_ip_funcs cz_ih_ip_funcs = { .soft_reset = cz_ih_soft_reset, .set_clockgating_state = cz_ih_set_clockgating_state, .set_powergating_state = cz_ih_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs cz_ih_funcs = {
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -0
@@ -3333,6 +3333,7 @@ static const struct amd_ip_funcs dce_v10_0_ip_funcs = { .soft_reset = dce_v10_0_soft_reset, .set_clockgating_state = dce_v10_0_set_clockgating_state, .set_powergating_state = dce_v10_0_set_powergating_state, + .dump_ip_state = NULL, }; static void
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -0
@@ -3464,6 +3464,7 @@ static const struct amd_ip_funcs dce_v11_0_ip_funcs = { .soft_reset = dce_v11_0_soft_reset, .set_clockgating_state = dce_v11_0_set_clockgating_state, .set_powergating_state = dce_v11_0_set_powergating_state, + .dump_ip_state = NULL, }; static void
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1 -0
@@ -3154,6 +3154,7 @@ static const struct amd_ip_funcs dce_v6_0_ip_funcs = { .soft_reset = dce_v6_0_soft_reset, .set_clockgating_state = dce_v6_0_set_clockgating_state, .set_powergating_state = dce_v6_0_set_powergating_state, + .dump_ip_state = NULL, }; static void
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -0
@@ -3242,6 +3242,7 @@ static const struct amd_ip_funcs dce_v8_0_ip_funcs = { .soft_reset = dce_v8_0_soft_reset, .set_clockgating_state = dce_v8_0_set_clockgating_state, .set_powergating_state = dce_v8_0_set_powergating_state, + .dump_ip_state = NULL, }; static void
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
@@ -9170,6 +9170,7 @@ static const struct amd_ip_funcs gfx_v10_0_ip_funcs = { .set_clockgating_state = gfx_v10_0_set_clockgating_state, .set_powergating_state = gfx_v10_0_set_powergating_state, .get_clockgating_state = gfx_v10_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_gfx = {
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -0
@@ -6174,6 +6174,7 @@ static const struct amd_ip_funcs gfx_v11_0_ip_funcs = { .set_clockgating_state = gfx_v11_0_set_clockgating_state, .set_powergating_state = gfx_v11_0_set_powergating_state, .get_clockgating_state = gfx_v11_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs gfx_v11_0_ring_funcs_gfx = {
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +1 -0
@@ -3457,6 +3457,7 @@ static const struct amd_ip_funcs gfx_v6_0_ip_funcs = { .soft_reset = gfx_v6_0_soft_reset, .set_clockgating_state = gfx_v6_0_set_clockgating_state, .set_powergating_state = gfx_v6_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_gfx = {
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -0
@@ -4977,6 +4977,7 @@ static const struct amd_ip_funcs gfx_v7_0_ip_funcs = { .soft_reset = gfx_v7_0_soft_reset, .set_clockgating_state = gfx_v7_0_set_clockgating_state, .set_powergating_state = gfx_v7_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_gfx = {
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -0
@@ -6878,6 +6878,7 @@ static const struct amd_ip_funcs gfx_v8_0_ip_funcs = { .set_clockgating_state = gfx_v8_0_set_clockgating_state, .set_powergating_state = gfx_v8_0_set_powergating_state, .get_clockgating_state = gfx_v8_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_gfx = {
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -0
@@ -6856,6 +6856,7 @@ static const struct amd_ip_funcs gfx_v9_0_ip_funcs = { .set_clockgating_state = gfx_v9_0_set_clockgating_state, .set_powergating_state = gfx_v9_0_set_powergating_state, .get_clockgating_state = gfx_v9_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = {
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +1 -0
@@ -4016,6 +4016,7 @@ static const struct amd_ip_funcs gfx_v9_4_3_ip_funcs = { .set_clockgating_state = gfx_v9_4_3_set_clockgating_state, .set_powergating_state = gfx_v9_4_3_set_powergating_state, .get_clockgating_state = gfx_v9_4_3_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs gfx_v9_4_3_ring_funcs_compute = {
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -0
@@ -1115,6 +1115,7 @@ static const struct amd_ip_funcs gmc_v6_0_ip_funcs = { .soft_reset = gmc_v6_0_soft_reset, .set_clockgating_state = gmc_v6_0_set_clockgating_state, .set_powergating_state = gmc_v6_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_gmc_funcs gmc_v6_0_gmc_funcs = {
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +1 -0
@@ -1354,6 +1354,7 @@ static const struct amd_ip_funcs gmc_v7_0_ip_funcs = { .soft_reset = gmc_v7_0_soft_reset, .set_clockgating_state = gmc_v7_0_set_clockgating_state, .set_powergating_state = gmc_v7_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_gmc_funcs gmc_v7_0_gmc_funcs = {
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +1 -0
@@ -1717,6 +1717,7 @@ static const struct amd_ip_funcs gmc_v8_0_ip_funcs = { .set_clockgating_state = gmc_v8_0_set_clockgating_state, .set_powergating_state = gmc_v8_0_set_powergating_state, .get_clockgating_state = gmc_v8_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_gmc_funcs gmc_v8_0_gmc_funcs = {
drivers/gpu/drm/amd/amdgpu/iceland_ih.c +1 -0
@@ -425,6 +425,7 @@ static const struct amd_ip_funcs iceland_ih_ip_funcs = { .soft_reset = iceland_ih_soft_reset, .set_clockgating_state = iceland_ih_set_clockgating_state, .set_powergating_state = iceland_ih_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs iceland_ih_funcs = {
drivers/gpu/drm/amd/amdgpu/ih_v6_0.c +1 -0
@@ -748,6 +748,7 @@ static const struct amd_ip_funcs ih_v6_0_ip_funcs = { .set_clockgating_state = ih_v6_0_set_clockgating_state, .set_powergating_state = ih_v6_0_set_powergating_state, .get_clockgating_state = ih_v6_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs ih_v6_0_funcs = {
drivers/gpu/drm/amd/amdgpu/ih_v6_1.c +1 -0
@@ -753,6 +753,7 @@ static const struct amd_ip_funcs ih_v6_1_ip_funcs = { .set_clockgating_state = ih_v6_1_set_clockgating_state, .set_powergating_state = ih_v6_1_set_powergating_state, .get_clockgating_state = ih_v6_1_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs ih_v6_1_funcs = {
drivers/gpu/drm/amd/amdgpu/ih_v7_0.c +1 -0
@@ -749,6 +749,7 @@ static const struct amd_ip_funcs ih_v7_0_ip_funcs = { .set_clockgating_state = ih_v7_0_set_clockgating_state, .set_powergating_state = ih_v7_0_set_powergating_state, .get_clockgating_state = ih_v7_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs ih_v7_0_funcs = {
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c +1 -0
@@ -759,6 +759,7 @@ static const struct amd_ip_funcs jpeg_v2_0_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = jpeg_v2_0_set_clockgating_state, .set_powergating_state = jpeg_v2_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs jpeg_v2_0_dec_ring_vm_funcs = {
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c +2 -0
@@ -632,6 +632,7 @@ static const struct amd_ip_funcs jpeg_v2_5_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = jpeg_v2_5_set_clockgating_state, .set_powergating_state = jpeg_v2_5_set_powergating_state, + .dump_ip_state = NULL, };static const struct amd_ip_funcs jpeg_v2_6_ip_funcs = {
@@ -652,6 +653,7 @@ static const struct amd_ip_funcs jpeg_v2_6_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = jpeg_v2_5_set_clockgating_state, .set_powergating_state = jpeg_v2_5_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs jpeg_v2_5_dec_ring_vm_funcs = {
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +1 -0
@@ -557,6 +557,7 @@ static const struct amd_ip_funcs jpeg_v3_0_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = jpeg_v3_0_set_clockgating_state, .set_powergating_state = jpeg_v3_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs jpeg_v3_0_dec_ring_vm_funcs = {
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c +1 -0
@@ -719,6 +719,7 @@ static const struct amd_ip_funcs jpeg_v4_0_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = jpeg_v4_0_set_clockgating_state, .set_powergating_state = jpeg_v4_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs jpeg_v4_0_dec_ring_vm_funcs = {
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c +1 -0
@@ -1053,6 +1053,7 @@ static const struct amd_ip_funcs jpeg_v4_0_3_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = jpeg_v4_0_3_set_clockgating_state, .set_powergating_state = jpeg_v4_0_3_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs jpeg_v4_0_3_dec_ring_vm_funcs = {
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c +1 -0
@@ -762,6 +762,7 @@ static const struct amd_ip_funcs jpeg_v4_0_5_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = jpeg_v4_0_5_set_clockgating_state, .set_powergating_state = jpeg_v4_0_5_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs jpeg_v4_0_5_dec_ring_vm_funcs = {
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +1 -0
@@ -513,6 +513,7 @@ static const struct amd_ip_funcs jpeg_v5_0_0_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = jpeg_v5_0_0_set_clockgating_state, .set_powergating_state = jpeg_v5_0_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs jpeg_v5_0_0_dec_ring_vm_funcs = {
drivers/gpu/drm/amd/amdgpu/mes_v10_1.c +1 -0
@@ -1176,6 +1176,7 @@ static const struct amd_ip_funcs mes_v10_1_ip_funcs = { .hw_fini = mes_v10_1_hw_fini, .suspend = mes_v10_1_suspend, .resume = mes_v10_1_resume, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version mes_v10_1_ip_block = {
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1 -0
@@ -1334,6 +1334,7 @@ static const struct amd_ip_funcs mes_v11_0_ip_funcs = { .hw_fini = mes_v11_0_hw_fini, .suspend = mes_v11_0_suspend, .resume = mes_v11_0_resume, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version mes_v11_0_ip_block = {
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +1 -0
@@ -713,6 +713,7 @@ static const struct amd_ip_funcs navi10_ih_ip_funcs = { .set_clockgating_state = navi10_ih_set_clockgating_state, .set_powergating_state = navi10_ih_set_powergating_state, .get_clockgating_state = navi10_ih_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs navi10_ih_funcs = {
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
@@ -1131,4 +1131,5 @@ static const struct amd_ip_funcs nv_common_ip_funcs = { .set_clockgating_state = nv_common_set_clockgating_state, .set_powergating_state = nv_common_set_powergating_state, .get_clockgating_state = nv_common_get_clockgating_state, + .dump_ip_state = NULL, };
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +1 -0
@@ -1113,6 +1113,7 @@ static const struct amd_ip_funcs sdma_v2_4_ip_funcs = { .soft_reset = sdma_v2_4_soft_reset, .set_clockgating_state = sdma_v2_4_set_clockgating_state, .set_powergating_state = sdma_v2_4_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs sdma_v2_4_ring_funcs = {
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1 -0
@@ -1553,6 +1553,7 @@ static const struct amd_ip_funcs sdma_v3_0_ip_funcs = { .set_clockgating_state = sdma_v3_0_set_clockgating_state, .set_powergating_state = sdma_v3_0_set_powergating_state, .get_clockgating_state = sdma_v3_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs sdma_v3_0_ring_funcs = {
drivers/gpu/drm/amd/amdgpu/si.c +1 -0
@@ -2706,6 +2706,7 @@ static const struct amd_ip_funcs si_common_ip_funcs = { .soft_reset = si_common_soft_reset, .set_clockgating_state = si_common_set_clockgating_state, .set_powergating_state = si_common_set_powergating_state, + .dump_ip_state = NULL, }; static const struct amdgpu_ip_block_version si_common_ip_block =
drivers/gpu/drm/amd/amdgpu/si_dma.c +1 -0
@@ -708,6 +708,7 @@ static const struct amd_ip_funcs si_dma_ip_funcs = { .soft_reset = si_dma_soft_reset, .set_clockgating_state = si_dma_set_clockgating_state, .set_powergating_state = si_dma_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs si_dma_ring_funcs = {
drivers/gpu/drm/amd/amdgpu/si_ih.c +1 -0
@@ -296,6 +296,7 @@ static const struct amd_ip_funcs si_ih_ip_funcs = { .soft_reset = si_ih_soft_reset, .set_clockgating_state = si_ih_set_clockgating_state, .set_powergating_state = si_ih_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs si_ih_funcs = {
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -0
@@ -1501,4 +1501,5 @@ static const struct amd_ip_funcs soc15_common_ip_funcs = { .set_clockgating_state = soc15_common_set_clockgating_state, .set_powergating_state = soc15_common_set_powergating_state, .get_clockgating_state= soc15_common_get_clockgating_state, + .dump_ip_state = NULL, };
drivers/gpu/drm/amd/amdgpu/soc21.c +1 -0
@@ -985,4 +985,5 @@ static const struct amd_ip_funcs soc21_common_ip_funcs = { .set_clockgating_state = soc21_common_set_clockgating_state, .set_powergating_state = soc21_common_set_powergating_state, .get_clockgating_state = soc21_common_get_clockgating_state, + .dump_ip_state = NULL, };
drivers/gpu/drm/amd/amdgpu/tonga_ih.c +1 -0
@@ -486,6 +486,7 @@ static const struct amd_ip_funcs tonga_ih_ip_funcs = { .post_soft_reset = tonga_ih_post_soft_reset, .set_clockgating_state = tonga_ih_set_clockgating_state, .set_powergating_state = tonga_ih_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ih_funcs tonga_ih_funcs = {
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c +1 -0
@@ -819,6 +819,7 @@ static const struct amd_ip_funcs uvd_v3_1_ip_funcs = { .soft_reset = uvd_v3_1_soft_reset, .set_clockgating_state = uvd_v3_1_set_clockgating_state, .set_powergating_state = uvd_v3_1_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version uvd_v3_1_ip_block = {
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +1 -0
@@ -769,6 +769,7 @@ static const struct amd_ip_funcs uvd_v4_2_ip_funcs = { .soft_reset = uvd_v4_2_soft_reset, .set_clockgating_state = uvd_v4_2_set_clockgating_state, .set_powergating_state = uvd_v4_2_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs uvd_v4_2_ring_funcs = {
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +1 -0
@@ -877,6 +877,7 @@ static const struct amd_ip_funcs uvd_v5_0_ip_funcs = { .set_clockgating_state = uvd_v5_0_set_clockgating_state, .set_powergating_state = uvd_v5_0_set_powergating_state, .get_clockgating_state = uvd_v5_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs uvd_v5_0_ring_funcs = {
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +1 -0
@@ -1545,6 +1545,7 @@ static const struct amd_ip_funcs uvd_v6_0_ip_funcs = { .set_clockgating_state = uvd_v6_0_set_clockgating_state, .set_powergating_state = uvd_v6_0_set_powergating_state, .get_clockgating_state = uvd_v6_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs uvd_v6_0_ring_phys_funcs = {
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c +1 -0
@@ -626,6 +626,7 @@ static const struct amd_ip_funcs vce_v2_0_ip_funcs = { .soft_reset = vce_v2_0_soft_reset, .set_clockgating_state = vce_v2_0_set_clockgating_state, .set_powergating_state = vce_v2_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs vce_v2_0_ring_funcs = {
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +1 -0
@@ -913,6 +913,7 @@ static const struct amd_ip_funcs vce_v3_0_ip_funcs = { .set_clockgating_state = vce_v3_0_set_clockgating_state, .set_powergating_state = vce_v3_0_set_powergating_state, .get_clockgating_state = vce_v3_0_get_clockgating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs vce_v3_0_ring_phys_funcs = {
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +1 -0
@@ -1902,6 +1902,7 @@ static const struct amd_ip_funcs vcn_v1_0_ip_funcs = { .post_soft_reset = NULL /* vcn_v1_0_post_soft_reset */, .set_clockgating_state = vcn_v1_0_set_clockgating_state, .set_powergating_state = vcn_v1_0_set_powergating_state, + .dump_ip_state = NULL, };/*
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +1 -0
@@ -2008,6 +2008,7 @@ static const struct amd_ip_funcs vcn_v2_0_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = vcn_v2_0_set_clockgating_state, .set_powergating_state = vcn_v2_0_set_powergating_state, + .dump_ip_state = NULL, };static const struct amdgpu_ring_funcs vcn_v2_0_dec_ring_vm_funcs = {
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +2 -0
@@ -1901,6 +1901,7 @@ static const struct amd_ip_funcs vcn_v2_5_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = vcn_v2_5_set_clockgating_state, .set_powergating_state = vcn_v2_5_set_powergating_state, + .dump_ip_state = NULL, };static const struct amd_ip_funcs vcn_v2_6_ip_funcs = {
@@ -1921,6 +1922,7 @@ static const struct amd_ip_funcs vcn_v2_6_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = vcn_v2_5_set_clockgating_state, .set_powergating_state = vcn_v2_5_set_powergating_state, + .dump_ip_state = NULL, }; const struct amdgpu_ip_block_version vcn_v2_5_ip_block =
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +1 -0
@@ -2230,6 +2230,7 @@ static const struct amd_ip_funcs vcn_v3_0_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = vcn_v3_0_set_clockgating_state, .set_powergating_state = vcn_v3_0_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version vcn_v3_0_ip_block = {
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +1 -0
@@ -2130,6 +2130,7 @@ static const struct amd_ip_funcs vcn_v4_0_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = vcn_v4_0_set_clockgating_state, .set_powergating_state = vcn_v4_0_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version vcn_v4_0_ip_block = {
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1 -0
@@ -1660,6 +1660,7 @@ static const struct amd_ip_funcs vcn_v4_0_3_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = vcn_v4_0_3_set_clockgating_state, .set_powergating_state = vcn_v4_0_3_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version vcn_v4_0_3_ip_block = {
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +1 -0
@@ -1752,6 +1752,7 @@ static const struct amd_ip_funcs vcn_v4_0_5_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = vcn_v4_0_5_set_clockgating_state, .set_powergating_state = vcn_v4_0_5_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version vcn_v4_0_5_ip_block = {
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1 -0
@@ -1328,6 +1328,7 @@ static const struct amd_ip_funcs vcn_v5_0_0_ip_funcs = { .post_soft_reset = NULL, .set_clockgating_state = vcn_v5_0_0_set_clockgating_state, .set_powergating_state = vcn_v5_0_0_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version vcn_v5_0_0_ip_block = {
drivers/gpu/drm/amd/amdgpu/vi.c +1 -0
@@ -2058,6 +2058,7 @@ static const struct amd_ip_funcs vi_common_ip_funcs = { .set_clockgating_state = vi_common_set_clockgating_state, .set_powergating_state = vi_common_set_powergating_state, .get_clockgating_state = vi_common_get_clockgating_state, + .dump_ip_state = NULL, }; static const struct amdgpu_ip_block_version vi_common_ip_block =
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -3111,6 +3111,7 @@ static const struct amd_ip_funcs amdgpu_dm_funcs = { .soft_reset = dm_soft_reset, .set_clockgating_state = dm_set_clockgating_state, .set_powergating_state = dm_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version dm_ip_block = {
drivers/gpu/drm/amd/include/amd_shared.h +1 -0
@@ -321,6 +321,7 @@ struct amd_ip_funcs {int (*set_powergating_state)(void *handle,enum amd_powergating_state state);void (*get_clockgating_state)(void *handle,u64 *flags); +void (*dump_ip_state)(void *handle); };
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +1 -0
@@ -3316,6 +3316,7 @@ static const struct amd_ip_funcs kv_dpm_ip_funcs = { .soft_reset = kv_dpm_soft_reset, .set_clockgating_state = kv_dpm_set_clockgating_state, .set_powergating_state = kv_dpm_set_powergating_state, + .dump_ip_state = NULL, };const struct amdgpu_ip_block_version kv_smu_ip_block = {
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +1 -0
@@ -8060,6 +8060,7 @@ static const struct amd_ip_funcs si_dpm_ip_funcs = { .soft_reset = si_dpm_soft_reset, .set_clockgating_state = si_dpm_set_clockgating_state, .set_powergating_state = si_dpm_set_powergating_state, + .dump_ip_state = NULL, }; const struct amdgpu_ip_block_version si_smu_ip_block =
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +1 -0
@@ -302,6 +302,7 @@ static const struct amd_ip_funcs pp_ip_funcs = { .soft_reset = pp_sw_reset, .set_clockgating_state = pp_set_clockgating_state, .set_powergating_state = pp_set_powergating_state, + .dump_ip_state = NULL, }; const struct amdgpu_ip_block_version pp_smu_ip_block =
Signature · 1 line
2.34.1
PATCH 1/2 drm:amdgpu: Enable IH RING1 for IH v6.0
In reply to Sunil KhatriWe need IH Ring1 for handling the pagefault
interrupts which are overflowing the default
ring for specific usecases.
--- drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/ih_v6_0.c +6 -2
@@ -549,8 +549,12 @@ static int ih_v6_0_sw_init(void *handle) adev->irq.ih.use_doorbell = true; adev->irq.ih.doorbell_index = adev->doorbell_index.ih <<1 ; - adev->irq.ih1.ring_size =0 ; - adev->irq.ih2.ring_size =0 ; + r =amdgpu_ih_ring_init (adev, &adev->irq.ih1,IH_RING_SIZE , use_bus_addr); +if (r) +return r; + + adev->irq.ih1.use_doorbell = true; + adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih +1 ) <<1 ;/* initialize ih control register offset */ ih_v6_0_init_register_offset (adev);
Signature · 1 line
2.34.1
cover Init ring1 for IH
In reply to Sunil KhatriSunil Khatri (2):
drm:amdgpu: Enable IH RING1 for IH v6.0
drm:amdgpu: Enable IH RING1 for IH v6.1
drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 8 ++++++-- drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1
PATCH 2/2 drm/amdgpu: Add support of gfx10 register dump
In reply to Sunil KhatriAdding initial set of registers for ipdump during devcoredump starting with gfx10 gc registers.
ip dump is triggered when gpu reset happens via devcoredump and the memory is allocated by each ip and is freed once the dump is complete by devcoredump.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 16 ++ .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 22 +++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 143 +++++++++++++++++- 3 files changed, 180 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +16 -0
@@ -139,6 +139,18 @@ enum amdgpu_ss {AMDGPU_SS_DRV_UNLOAD }; +struct hwip_reg_entry { +u32 hwip; +u32 inst; +u32 seg; +u32 reg_offset; +}; + +struct reg_pair { +u32 offset; +u32 value; +}; +struct amdgpu_watchdog_timer {bool timeout_fatal_disable;uint32_t period;/* maxCycles = (1 << period), the number of cycles before a timeout */
@@ -1152,6 +1164,10 @@ struct amdgpu_device {bool debug_largebar;bool debug_disable_soft_recovery;bool debug_use_vram_fw_buf; + +/* IP register dump */ +struct reg_pair *ip_dump; +uint32_t num_regs; }; static inline uint32_t amdgpu_ip_version(const struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +22 -0
@@ -261,6 +261,18 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,drm_printf (&p,"Faulty page starting at address: 0x%016llx\n" , fault_info->addr);drm_printf (&p,"Protection fault status register: 0x%x\n\n" , fault_info->status); +/* Add IP dump for each ip */ +if (coredump->adev->ip_dump !=NULL ) { +struct reg_pair *pair; + + pair = (struct reg_pair *)coredump->adev->ip_dump; +drm_printf (&p,"IP register dump\n" ); +drm_printf (&p,"Offset \t Value\n" ); +for (int i =0 ; i < coredump->adev->num_regs; i++) +drm_printf (&p,"0x%04x \t 0x%08x\n" , pair[i].offset, pair[i].value); +drm_printf (&p,"\n" ); + } +/* Add ring buffer information */ drm_printf (&p,"Ring buffer information\n" );for (int i =0 ; i < coredump->adev->num_rings; i++) {
@@ -299,6 +311,11 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,static void amdgpu_devcoredump_free (void *data) { +struct amdgpu_coredump_info *temp = data; + +kfree (temp->adev->ip_dump); + temp->adev->ip_dump =NULL ; + temp->adev->num_regs =0 ;kfree (data); }
@@ -337,6 +354,11 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool vram_lost, coredump->adev = adev; +/* Trigger ip dump here to capture the value of registers */ +for (int i =0 ; i < adev->num_ip_blocks; i++) +if (adev->ip_blocks[i].version->funcs->dump_ip_state) + adev->ip_blocks[i].version->funcs->dump_ip_state ((void *)adev); +ktime_get_ts64 (&coredump->reset_time); dev_coredumpm(dev->dev, THIS_MODULE, coredump, 0, GFP_NOWAIT,
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +142 -1
167 lines not on this page · raw message
Signature · 1 line
2.34.1
RE: [PATCH 2/2] drm/amdgpu: Add support of gfx10 register dump
[AMD Official Use Only - General]
Ignore sent by mistake.
-----Original Message-----
From: Sunil Khatri <[email protected]>
Sent: Friday, April 12, 2024 2:30 PM
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Cc: [email protected]; Khatri, Sunil <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: Add support of gfx10 register dump
Adding initial set of registers for ipdump during devcoredump starting with gfx10 gc registers.
ip dump is triggered when gpu reset happens via devcoredump and the memory is allocated by each ip and is freed once the dump is complete by devcoredump.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 16 ++ .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 22 +++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 143 +++++++++++++++++- 3 files changed, 180 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +12 -0
@@ -139,6 +139,18 @@ enum amdgpu_ss {AMDGPU_SS_DRV_UNLOAD }; +struct hwip_reg_entry { +u32 hwip; +u32 inst; +u32 seg; +u32 reg_offset; +}; + +struct reg_pair { +u32 offset; +u32 value; +}; +struct amdgpu_watchdog_timer {bool timeout_fatal_disable; uint32_t period; /* maxCycles = (1 << period), the number of cycles before a timeout */ @@ -1152,6 +1164,10 @@ struct amdgpu_device {
bool debug_largebar;
bool debug_disable_soft_recovery;
bool debug_use_vram_fw_buf;
+
+ /* IP register dump */
+ struct reg_pair *ip_dump;
+ uint32_t num_regs;};
static inline uint32_t amdgpu_ip_version(const struct amdgpu_device *adev, diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
index 1129e5e5fb42..2079f67c9fac 100644
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +12 -0
@@ -261,6 +261,18 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,drm_printf (&p,"Faulty page starting at address: 0x%016llx\n" , fault_info->addr);drm_printf (&p,"Protection fault status register: 0x%x\n\n" , fault_info->status); +/* Add IP dump for each ip */ +if (coredump->adev->ip_dump !=NULL ) { +struct reg_pair *pair; + + pair = (struct reg_pair *)coredump->adev->ip_dump; +drm_printf (&p,"IP register dump\n" ); +drm_printf (&p,"Offset \t Value\n" ); +for (int i =0 ; i < coredump->adev->num_regs; i++) +drm_printf (&p,"0x%04x \t 0x%08x\n" , pair[i].offset, pair[i].value); +drm_printf (&p,"\n" ); + } +/* Add ring buffer information */ drm_printf (&p,"Ring buffer information\n" ); for (int i = 0; i < coredump->adev->num_rings; i++) { @@ -299,6 +311,11 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
static void amdgpu_devcoredump_free(void *data) {
+ struct amdgpu_coredump_info *temp = data;
+
+ kfree(temp->adev->ip_dump);
+ temp->adev->ip_dump = NULL;
+ temp->adev->num_regs = 0;
kfree(data);}
@@ -337,6 +354,11 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool vram_lost,
coredump->adev = adev;
+ /* Trigger ip dump here to capture the value of registers */
+ for (int i = 0; i < adev->num_ip_blocks; i++)
+ if (adev->ip_blocks[i].version->funcs->dump_ip_state)
+ adev->ip_blocks[i].version->funcs->dump_ip_state((void *)adev);
+
ktime_get_ts64(&coredump->reset_time);
dev_coredumpm(dev->dev, THIS_MODULE, coredump, 0, GFP_NOWAIT, diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.cindex a0bc4196ff8b..05c4b1d62132 100644
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +107 -0
119 lines not on this page · raw message
amdgpu_ring_write(ring, gcr_cntl); /* GCR_CNTL */ }
+static void gfx_v10_ip_dump(void *handle) {
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+ uint32_t reg_count = ARRAY_SIZE(gc_reg_list_10_1);
+ struct reg_pair *ptr, *gfx10_pair;
+ uint32_t new_count;
+
+ /*
+ * Allocate memory based on the no of registers for each block.
+ * Since adev->ip_dump is common pointer and we add more
+ * memory to it as we move through different IP's of the ASIC.
+ *
+ * This memory needs to be freed after gpu reset once the ip
+ * dump is done in the devcoredump.
+ */
+ new_count = adev->num_regs + reg_count;
+ ptr = krealloc_array(adev->ip_dump, new_count, sizeof(struct reg_pair), GFP_KERNEL);
+ if (ptr) {
+ adev->ip_dump = ptr;
+ gfx10_pair = &ptr[adev->num_regs];
+ adev->num_regs = new_count;+ } else {
+ DRM_ERROR("Failed to allocate memory for IP Dump\n");
+ return;
+ }
+
+ for (uint32_t i = 0; i < reg_count; i++) {
+ gfx10_pair[i].offset = gc_reg_list_10_1[i].reg_offset;
+ gfx10_pair[i].value = RREG32(SOC15_REG_ENTRY_OFFSET(gc_reg_list_10_1[i]));
+ }
+}
+
static const struct amd_ip_funcs gfx_v10_0_ip_funcs = {
.name = "gfx_v10_0",
.early_init = gfx_v10_0_early_init,@@ -9170,7 +9311,7 @@ static const struct amd_ip_funcs gfx_v10_0_ip_funcs = {
.set_clockgating_state = gfx_v10_0_set_clockgating_state, .set_powergating_state = gfx_v10_0_set_powergating_state, .get_clockgating_state = gfx_v10_0_get_clockgating_state,
- .dump_ip_state = NULL,
+ .dump_ip_state = gfx_v10_ip_dump,
};
static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_gfx = {
--
2.34.1
PATCH 2/2 drm:amdgpu: Enable IH RING1 for IH v6.1
In reply to Sunil KhatriWe need IH Ring1 for handling the pagefault
interrupts which are overflowing the default
ring for specific usecases.
--- drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/ih_v6_1.c +6 -2
@@ -550,8 +550,12 @@ static int ih_v6_1_sw_init(void *handle) adev->irq.ih.use_doorbell = true; adev->irq.ih.doorbell_index = adev->doorbell_index.ih <<1 ; - adev->irq.ih1.ring_size =0 ; - adev->irq.ih2.ring_size =0 ; + r =amdgpu_ih_ring_init (adev, &adev->irq.ih1,IH_RING_SIZE , use_bus_addr); +if (r) +return r; + + adev->irq.ih1.use_doorbell = true; + adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih +1 ) <<1 ;/* initialize ih control register offset */ ih_v6_1_init_register_offset (adev);
Signature · 1 line
2.34.1
[AMD Official Use Only - General]
Ignore the series sent by mistake
-----Original Message-----
From: Sunil Khatri <[email protected]>
Sent: Friday, April 12, 2024 2:30 PM
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
Cc: [email protected]; Khatri, Sunil <[email protected]>
Subject: [PATCH 0/2] First set in IP dump patches
Adding infrastructure needed for ipdump along with dumping gfx10 registers.
Sunil Khatri (2):
drm/amdgpu: add prototype to dump ip state
drm/amdgpu: Add support of gfx10 register dump
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 16 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 1 + .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 22 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 1 + drivers/gpu/drm/amd/amdgpu/cik.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 + drivers/gpu/drm/amd/amdgpu/cz_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 142 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v6_1.c | 1 + drivers/gpu/drm/amd/amdgpu/ih_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 2 + drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/nv.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/si.c | 1 + drivers/gpu/drm/amd/amdgpu/si_dma.c | 1 + drivers/gpu/drm/amd/amdgpu/si_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 + drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vi.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/include/amd_shared.h | 1 + drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 1 + drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 1 + .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 1 + 66 files changed, 245 insertions(+)
--
2.34.1