drm/amdgpu/vcn: improve vcn dpg stop procedure
Subsystems (2)
PATCH 1/1 drm/amdgpu/vcn: improve vcn dpg stop procedure
Prior to disabling dpg, VCN need unpausing dpg mode, or VCN will hang in S3 resuming.
Signed-off-by Tianci Yin <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +3 -0
@@ -1480,8 +1480,11 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)static int vcn_v3_0_stop_dpg_mode (struct amdgpu_device *adev,int inst_idx) { +struct dpg_pause_state state = {.fw_based =VCN_DPG_STATE__UNPAUSE };uint32_t tmp; +vcn_v3_0_pause_dpg_mode (adev,0 , &state); +/* Wait for power status to be 1 */ SOC15_WAIT_ON_RREG (VCN , inst_idx, mmUVD_POWER_STATUS,1 ,UVD_POWER_STATUS__UVD_POWER_STATUS_MASK );
Signature · 1 line
2.25.1
[AMD Official Use Only]
This patch is Reviewed-by: James Zhu <[email protected]>
________________________________
From: Tianci Yin <[email protected]>
Sent: Wednesday, March 23, 2022 12:01 PM
To: [email protected] <[email protected]>
Cc: Chen, Guchun <[email protected]>; Zhu, James <[email protected]>; Wang, Yu (Charlie) <[email protected]>; Yin, Tianci (Rico) <[email protected]>
Subject: [PATCH] drm/amdgpu/vcn: improve vcn dpg stop procedure
Prior to disabling dpg, VCN need unpausing dpg mode, or VCN will hang in S3 resuming.
Signed-off-by Tianci Yin <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +3 -0
@@ -1480,8 +1480,11 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)static int vcn_v3_0_stop_dpg_mode (struct amdgpu_device *adev,int inst_idx) { +struct dpg_pause_state state = {.fw_based =VCN_DPG_STATE__UNPAUSE };uint32_t tmp; +vcn_v3_0_pause_dpg_mode (adev,0 , &state); +/* Wait for power status to be 1 */ SOC15_WAIT_ON_RREG (VCN , inst_idx, mmUVD_POWER_STATUS,1 ,UVD_POWER_STATUS__UVD_POWER_STATUS_MASK );
--
2.25.1