drm/amd/amdgpu: power up sdma_v4 for resume back period
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: power up sdma_v4 for resume back period
The sdma_v4 should be ungated when the IP resume back, otherwise it will hang up and resume time out error.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 10 ++++++---- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +1 -1
@@ -951,6 +951,7 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t blockcase AMD_IP_BLOCK_TYPE_UVD :case AMD_IP_BLOCK_TYPE_VCN :case AMD_IP_BLOCK_TYPE_VCE : +case AMD_IP_BLOCK_TYPE_SDMA :if (swsmu) ret =smu_dpm_set_power_gate (&adev->smu, block_type, gate);else
@@ -959,7 +960,6 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t blockbreak ;case AMD_IP_BLOCK_TYPE_GMC :case AMD_IP_BLOCK_TYPE_ACP : -case AMD_IP_BLOCK_TYPE_SDMA : ret = ((adev)->powerplay.pp_funcs->set_powergating_by_smu ( (adev)->powerplay.pp_handle, block_type, gate));break ;
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +6 -4
@@ -1801,8 +1801,9 @@ static int sdma_v4_0_hw_init(void *handle)int r;struct amdgpu_device *adev = (struct amdgpu_device *)handle; -if (adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs && - adev->powerplay.pp_funcs->set_powergating_by_smu) +if ((adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs && + adev->powerplay.pp_funcs->set_powergating_by_smu) || + adev->asic_type ==CHIP_RENOIR )amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_SDMA , false);if (!amdgpu_sriov_vf (adev))
@@ -1829,8 +1830,9 @@ static int sdma_v4_0_hw_fini(void *handle)sdma_v4_0_ctx_switch_enable (adev, false);sdma_v4_0_enable (adev, false); -if (adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs - && adev->powerplay.pp_funcs->set_powergating_by_smu) +if ((adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs + && adev->powerplay.pp_funcs->set_powergating_by_smu) || + adev->asic_type ==CHIP_RENOIR )amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_SDMA , true);return 0 ;
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +3 -0
@@ -400,6 +400,9 @@ int smu_dpm_set_power_gate(struct smu_context *smu, uint32_t block_type,case AMD_IP_BLOCK_TYPE_GFX : ret =smu_gfx_off_control (smu, gate);break ; +case AMD_IP_BLOCK_TYPE_SDMA : + ret =smu_powergate_sdma (smu, gate); +break ;default :break ; }
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): 1568253538-27220-1-git-send-email-Prike.Liang-5C7GfCeVMHo@public.gmane.org
It's better to say "sdma engine" or just "sdma" instead of "sdma_v4". Anyway, the patch is reviewed-by: Evan Quan <[email protected]>
-----Original Message-----
From: Liang, Prike <[email protected]>
Sent: Thursday, September 12, 2019 9:59 AM
To: [email protected]
Cc: Quan, Evan <[email protected]>; Feng, Kenneth <[email protected]>; Huang, Ray <[email protected]>; Liu, Aaron <[email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: power up sdma_v4 for resume back period
The sdma_v4 should be ungated when the IP resume back, otherwise it will hang up and resume time out error.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 10 ++++++---- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +1 -1
@@ -951,6 +951,7 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t blockcase AMD_IP_BLOCK_TYPE_UVD :case AMD_IP_BLOCK_TYPE_VCN :case AMD_IP_BLOCK_TYPE_VCE : +case AMD_IP_BLOCK_TYPE_SDMA :if (swsmu) ret =smu_dpm_set_power_gate (&adev->smu, block_type, gate);else
@@ -959,7 +960,6 @@ int amdgpu_dpm_set_powergating_by_smu(struct amdgpu_device *adev, uint32_t blockbreak ;case AMD_IP_BLOCK_TYPE_GMC :case AMD_IP_BLOCK_TYPE_ACP : -case AMD_IP_BLOCK_TYPE_SDMA : ret = ((adev)->powerplay.pp_funcs->set_powergating_by_smu ( (adev)->powerplay.pp_handle, block_type, gate));break ;
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +6 -4
@@ -1801,8 +1801,9 @@ static int sdma_v4_0_hw_init(void *handle)int r;struct amdgpu_device *adev = (struct amdgpu_device *)handle; -if (adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs && - adev->powerplay.pp_funcs->set_powergating_by_smu) +if ((adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs && + adev->powerplay.pp_funcs->set_powergating_by_smu) || + adev->asic_type ==CHIP_RENOIR )amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_SDMA , false);if (!amdgpu_sriov_vf (adev))
@@ -1829,8 +1830,9 @@ static int sdma_v4_0_hw_fini(void *handle)sdma_v4_0_ctx_switch_enable (adev, false);sdma_v4_0_enable (adev, false); -if (adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs - && adev->powerplay.pp_funcs->set_powergating_by_smu) +if ((adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs + && adev->powerplay.pp_funcs->set_powergating_by_smu) || + adev->asic_type ==CHIP_RENOIR )amdgpu_dpm_set_powergating_by_smu (adev,AMD_IP_BLOCK_TYPE_SDMA , true);return 0 ;
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +3 -0
@@ -400,6 +400,9 @@ int smu_dpm_set_power_gate(struct smu_context *smu, uint32_t block_type,case AMD_IP_BLOCK_TYPE_GFX : ret =smu_gfx_off_control (smu, gate);break ; +case AMD_IP_BLOCK_TYPE_SDMA : + ret =smu_powergate_sdma (smu, gate); +break ;default :break ; }
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): MN2PR12MB334464D43A27239078B7F728E4B00-rweVpJHSKToDMgCC8P//[email protected]
Thanks review and originally want emphasize the sequence only needed at sdma v4 case.
Thanks,
Prike
Quoted 110 lines
-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Thursday, September 12, 2019 10:20 AM
To: Liang, Prike <[email protected]>; [email protected]
Cc: Feng, Kenneth <[email protected]>; Huang, Ray <[email protected]>; Liu, Aaron <[email protected]>
Subject: RE: [PATCH] drm/amd/amdgpu: power upsdma_v4for resume back periodIt's better to say "sdma engine" or just "sdma" instead of "
sdma_v4". Anyway, the patch is reviewed-by: Evan Quan <[email protected]>-----Original Message-----
From: Liang, Prike <[email protected]>
Sent: Thursday, September 12, 2019 9:59 AM
To: [email protected]
Cc: Quan, Evan <[email protected]>; Feng, Kenneth <[email protected]>; Huang, Ray <[email protected]>; Liu, Aaron <[email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: power upsdma_v4for resume back periodThe
sdma_v4should be ungated when the IP resume back, otherwise it will hang up and resume time out error.Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 10 ++++++---- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +0
-0@@ -951,6 +951,7 @@ int amdgpu_dpm_set_powergating_by_smu(struct
amdgpu_device*adev,uint32_tblockdrivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +1
-0case AMD_IP_BLOCK_TYPE_UVD :case AMD_IP_BLOCK_TYPE_VCN :case AMD_IP_BLOCK_TYPE_VCE : +case AMD_IP_BLOCK_TYPE_SDMA :if (swsmu) ret = smu_dpm_set_power_gate(&adev->smu,
block_type, gate);drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +0
-0else @@ -959,7 +960,6 @@ int amdgpu_dpm_set_powergating_by_smu(struct
amdgpu_device*adev,uint32_tblockdrivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +0
-1break ;case AMD_IP_BLOCK_TYPE_GMC :case AMD_IP_BLOCK_TYPE_ACP : -case AMD_IP_BLOCK_TYPE_SDMA : ret = ((adev)->powerplay.pp_funcs-Quoted 1 line
set_powergating_by_smu(
(adev)->powerplay.pp_handle,
block_type,
gate));drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +0
-0break ;drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0
-1@@ -1801,8 +1801,9 @@ static int sdma_v4_0_hw_init(void *handle)int r;struct amdgpu_device *adev = (struct amdgpu_device *)handle; - if (adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs&&
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0
-1- adev->powerplay.pp_funcs-Quoted 1 line
set_powergating_by_smu)drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-0+ if ((adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs&&
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-0+ adev->powerplay.pp_funcs-Quoted 1 line
set_powergating_by_smu) ||drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-0+ adev->asic_type == CHIP_RENOIR) amdgpu_dpm_set_powergating_by_smu(adev,
AMD_IP_BLOCK_TYPE_SDMA, false);drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +2
-2if (!amdgpu_sriov_vf (adev))@@ -1829,8 +1830,9 @@ static int sdma_v4_0_hw_fini(void *handle)sdma_v4_0_ctx_switch_enable (adev, false);sdma_v4_0_enable (adev, false); -if (adev->asic_type ==CHIP_RAVEN && adev->powerplay.pp_funcs - && adev->powerplay.pp_funcs- >set_powergating_by_smu) + if ((adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs + && adev->powerplay.pp_funcs-Quoted 1 line
set_powergating_by_smu) ||drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-0+ adev->asic_type == CHIP_RENOIR) amdgpu_dpm_set_powergating_by_smu(adev,
AMD_IP_BLOCK_TYPE_SDMA, true);drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0
-0return 0 ;drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +3
-0@@ -400,6 +400,9 @@ int smu_dpm_set_power_gate(struct smu_context *smu, uint32_t block_type, case AMD_IP_BLOCK_TYPE_GFX: ret =smu_gfx_off_control (smu, gate);break ; +case AMD_IP_BLOCK_TYPE_SDMA : + ret =smu_powergate_sdma (smu, gate); +break ;default :break ;
Quoted 3 lines
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx