Skip to contentSkip to conversation

drm/amdgpu: Do not implement power-on for SDMA after do mode2 reset on Renoir

PATCH In review chen gong 2 participants 2 messages Sep 29, 2019 – Oct 1, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

chen gong

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Do not implement power-on for SDMA after do mode2 reset on Renoir

Find that ring sdma0 test failed if turn on SDMA powergating after do mode2 reset.

Perhaps the mode2 reset does not reset the SDMA PG state, SDMA is already powered up so there is no need to ask the SMU to power it up again. So I skip this function for a moment.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
index 96581b5..e0eb2450 100644
@@ -1792,7 +1792,7 @@ static int sdma_v4_0_hw_init(void *handle)
 
 	if ((adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs &&
 			adev->powerplay.pp_funcs->set_powergating_by_smu) ||
-			adev->asic_type == CHIP_RENOIR)
+			(adev->asic_type == CHIP_RENOIR && adev->in_gpu_reset != 1))
 		amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_SDMA, false);
 
 	if (!amdgpu_sriov_vf(adev))
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1569737976-23985-1-git-send-email-curry.gong-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 18 lines · chen gong

Find that ring sdma0 test failed if turn on SDMA powergating after do mode2 reset.

Perhaps the mode2 reset does not reset the SDMA PG state, SDMA is already powered up so there is no need to ask the SMU to power it up again. So I skip this function for a moment.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0 -0
index 96581b5..e0eb2450 100644

drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c static int sdma_v4_0_hw_init(void *handle) · line 1795

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
@@ -1792,7 +1792,7 @@ static int sdma_v4_0_hw_init(void *handle)
 
        if ((adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs &&
                        adev->powerplay.pp_funcs->set_powergating_by_smu) ||
-                       adev->asic_type == CHIP_RENOIR)
+                       (adev->asic_type == CHIP_RENOIR && adev->in_gpu_reset != 1))

How about !adev->in_gpu_reset rather than explicitly checking for 1? With that fixed:

Alex

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0 -1
                amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_SDMA, false);
 
        if (!amdgpu_sriov_vf(adev))
--

2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx