drm/amdgpu/vcn: fix vcn ring test failure in igt reload test
Subsystems (2)
PATCH 1/1 drm/amdgpu/vcn: fix vcn ring test failure in igt reload test
From: "Tianci.Yin" <[email protected]>
[why]
On Renoir, vcn ring test failed on the second time insmod in the reload test. After invetigation, it proves that vcn only can disable dpg under dpg unpause mode (dpg unpause mode is default for dec only, dpg pause mode is for dec/enc).
[how]
unpause dpg in dpg stopping procedure.
--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +2 -0
@@ -1098,8 +1098,10 @@ static int vcn_v2_0_start(struct amdgpu_device *adev)static int vcn_v2_0_stop_dpg_mode (struct amdgpu_device *adev) { +struct dpg_pause_state state = {.fw_based =VCN_DPG_STATE__UNPAUSE };uint32_t tmp; +vcn_v2_0_pause_dpg_mode (adev,0 , &state);/* Wait for power status to be 1 */ SOC15_WAIT_ON_RREG (UVD ,0 , mmUVD_POWER_STATUS,1 ,UVD_POWER_STATUS__UVD_POWER_STATUS_MASK );
Signature · 1 line
2.25.1
Dear Tianci,
Am 15.03.22 um 03:33 schrieb Tianci Yin:
Quoted 1 line
From: "Tianci.Yin" <[email protected]>
Please remove the dot/period in the name. (git config --global user.name "Tianci Yin".
Quoted 3 lines
[why]
On Renoir, vcn ring test failed on the second time insmod in the reload test.
Does Linux log a warning/error? Please paste it.
Quoted 1 line
After invetigation, it proves that vcn only can disable dpg under
investigation
Quoted 2 lines
dpg unpause mode (dpg unpause mode is default for dec only, dpg pause mode is for dec/enc).
Is that documented in a datasheet? Please mention name, revision, and section.
Why is this only needed for VCN v2.0 and not the other implementations?
Quoted 4 lines
[how]
unpause dpg in dpg stopping procedure.Change-Id: If6ec3af694e1d6b63ebce386a563f03ca6d291c1
Remove?
Quoted 1 line
Signed-off-by Tianci.Yin <[email protected]>
Ditto.
How did you test this exactly? Did you turn on DRM debug messages to verify that the function was called?
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static int vcn_v2_0_start(struct amdgpu_device *adev) · line 1107
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +2
-0@@ -1098,8 +1098,10 @@ static int vcn_v2_0_start(struct amdgpu_device *adev)static int vcn_v2_0_stop_dpg_mode (struct amdgpu_device *adev) { +struct dpg_pause_state state = {.fw_based =VCN_DPG_STATE__UNPAUSE };uint32_t tmp; +vcn_v2_0_pause_dpg_mode (adev,0 , &state);/* Wait for power status to be 1 */ SOC15_WAIT_ON_RREG (UVD ,0 , mmUVD_POWER_STATUS,1 ,UVD_POWER_STATUS__UVD_POWER_STATUS_MASK );
Kind regards,
Paul
This patch is Reviewed-by: James Zhu <[email protected]>
Quoted 32 lines · Tianci Yin
From: "Tianci.Yin" <[email protected]>
[why]
On Renoir, vcn ring test failed on the second time insmod in the reload test. After invetigation, it proves that vcn only can disable dpg under dpg unpause mode (dpg unpause mode is default for dec only, dpg pause mode is for dec/enc).[how]
unpause dpg in dpg stopping procedure.Change-Id If6ec3af694e1d6b63ebce386a563f03ca6d291c1Signed-off-by Tianci.Yin <[email protected]>--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +2
-0@@ -1098,8 +1098,10 @@ static int vcn_v2_0_start(struct amdgpu_device *adev)static int vcn_v2_0_stop_dpg_mode (struct amdgpu_device *adev) { +struct dpg_pause_state state = {.fw_based =VCN_DPG_STATE__UNPAUSE };uint32_t tmp; +vcn_v2_0_pause_dpg_mode (adev,0 , &state);/* Wait for power status to be 1 */ SOC15_WAIT_ON_RREG (UVD ,0 , mmUVD_POWER_STATUS,1 ,UVD_POWER_STATUS__UVD_POWER_STATUS_MASK );
[AMD Official Use Only]
Thank you for reviewing James!
Regards,
Rico
________________________________
From: Zhu, James <[email protected]>
Sent: Tuesday, March 15, 2022 20:01
To: Yin, Tianci (Rico) <[email protected]>; [email protected] <[email protected]>
Cc: Chen, Guchun <[email protected]>; Zhu, James <[email protected]>; Wang, Yu (Charlie) <[email protected]>
Subject: Re: [PATCH] drm/amdgpu/vcn: fix vcn ring test failure in igt reload test
This patch is Reviewed-by: James Zhu <[email protected]>
Quoted 32 lines · Tianci Yin
From: "Tianci.Yin" <[email protected]>
[why]
On Renoir, vcn ring test failed on the second time insmod in the reload test. After invetigation, it proves that vcn only can disable dpg under dpg unpause mode (dpg unpause mode is default for dec only, dpg pause mode is for dec/enc).[how]
unpause dpg in dpg stopping procedure.Change-Id If6ec3af694e1d6b63ebce386a563f03ca6d291c1Signed-off-by Tianci.Yin <[email protected]>--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +2
-0@@ -1098,8 +1098,10 @@ static int vcn_v2_0_start(struct amdgpu_device *adev)static int vcn_v2_0_stop_dpg_mode (struct amdgpu_device *adev) { +struct dpg_pause_state state = {.fw_based =VCN_DPG_STATE__UNPAUSE };uint32_t tmp; +vcn_v2_0_pause_dpg_mode (adev,0 , &state);/* Wait for power status to be 1 */ SOC15_WAIT_ON_RREG (UVD ,0 , mmUVD_POWER_STATUS,1 ,UVD_POWER_STATUS__UVD_POWER_STATUS_MASK );