drm/amdgpu: refine gprs init shaders to check coverage
Subsystems (2)
PATCH 1/1 drm/amdgpu: refine gprs init shaders to check coverage
Add codes to check whether all SIMDs are covered, make sure that all GPRs are initialized.
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +6 -3
@@ -4656,8 +4656,7 @@ static int gfx_v9_0_do_edc_gpr_workarounds(struct amdgpu_device *adev)if (!ring->sched.ready)return 0 ; -if (adev->asic_type ==CHIP_ARCTURUS || - adev->asic_type ==CHIP_ALDEBARAN ) { +if (adev->asic_type ==CHIP_ARCTURUS ) { vgpr_init_shader_ptr = vgpr_init_compute_shader_arcturus; vgpr_init_shader_size =sizeof (vgpr_init_compute_shader_arcturus); vgpr_init_regs_ptr = vgpr_init_regs_arcturus;
@@ -4924,7 +4923,11 @@ static int gfx_v9_0_ecc_late_init(void *handle) }/* requires IBs so do in late init after IB pool is initialized */ - r =gfx_v9_0_do_edc_gpr_workarounds (adev); +if (adev->asic_type ==CHIP_ALDEBARAN ) + r =gfx_v9_4_2_do_edc_gpr_workarounds (adev); +else + r =gfx_v9_0_do_edc_gpr_workarounds (adev); +if (r)return r;
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +375 -2
395 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.h +1 -0
@@ -29,6 +29,7 @@ void gfx_v9_4_2_debug_trap_config_init(struct amdgpu_device *adev,void gfx_v9_4_2_init_golden_registers (struct amdgpu_device *adev,uint32_t die_id);void gfx_v9_4_2_set_power_brake_sequence (struct amdgpu_device *adev); +int gfx_v9_4_2_do_edc_gpr_workarounds (struct amdgpu_device *adev);extern const struct amdgpu_gfx_ras_funcs gfx_v9_4_2_ras_funcs;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Regards,
Hawking
-----Original Message-----
From: Dennis Li <[email protected]>
Sent: Wednesday, April 21, 2021 13:51
To: [email protected]; Deucher, Alexander <[email protected]>; Kuehling, Felix <[email protected]>; Zhang, Hawking <[email protected]>; Koenig, Christian <[email protected]>
Cc: Li, Dennis <[email protected]>
Subject: [PATCH] drm/amdgpu: refine gprs init shaders to check coverage
Add codes to check whether all SIMDs are covered, make sure that all GPRs are initialized.
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -2
@@ -4656,8 +4656,7 @@ static int gfx_v9_0_do_edc_gpr_workarounds(struct amdgpu_device *adev)if (!ring->sched.ready)return 0 ; -if (adev->asic_type ==CHIP_ARCTURUS || - adev->asic_type ==CHIP_ALDEBARAN ) { +if (adev->asic_type ==CHIP_ARCTURUS ) { vgpr_init_shader_ptr = vgpr_init_compute_shader_arcturus; vgpr_init_shader_size =sizeof (vgpr_init_compute_shader_arcturus); vgpr_init_regs_ptr = vgpr_init_regs_arcturus; @@ -4924,7 +4923,11 @@ static int gfx_v9_0_ecc_late_init(void *handle)
}
/* requires IBs so do in late init after IB pool is initialized */
- r = gfx_v9_0_do_edc_gpr_workarounds(adev);
+ if (adev->asic_type == CHIP_ALDEBARAN)
+ r = gfx_v9_4_2_do_edc_gpr_workarounds(adev);
+ else
+ r = gfx_v9_0_do_edc_gpr_workarounds(adev);
+
if (r)
return r;
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +371 -2
388 lines not on this page · raw message
index 81c5833b6b9f..6db1f88509af 100644
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.h +1 -1
@@ -29,6 +29,7 @@ void gfx_v9_4_2_debug_trap_config_init(struct amdgpu_device *adev, void gfx_v9_4_2_init_golden_registers(struct amdgpu_device *adev, uint32_t die_id);void gfx_v9_4_2_set_power_brake_sequence (struct amdgpu_device *adev); +int gfx_v9_4_2_do_edc_gpr_workarounds (struct amdgpu_device *adev);extern const struct amdgpu_gfx_ras_funcs gfx_v9_4_2_ras_funcs; --
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx