drm/amdgpu: fix for set df cstate failed under sriov
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix for set df cstate failed under sriov
- set_df_cstate won't be called under sriov case.
Signed-off-by Shikang Fan <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +9 -7
@@ -2943,13 +2943,15 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE );amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE ); -/* -* Per PMFW team's suggestion, driver needs to handle gfxoff -* and df cstate features disablement for gpu reset(e.g. Mode1Reset) -* scenario. Add the missing df cstate disablement here. -*/ -if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW )) -dev_warn (adev->dev,"Failed to disallow df cstate" ); +if (!amdgpu_sriov_vf (adev)) { +/* +* Per PMFW team's suggestion, driver needs to handle gfxoff +* and df cstate features disablement for gpu reset(e.g. Mode1Reset) +* scenario. Add the missing df cstate disablement here. +*/ +if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW )) +dev_warn (adev->dev,"Failed to disallow df cstate" ); + }for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid)
Signature · 1 line
2.25.1
[AMD Official Use Only - General]
Hi Shikang,
your patch will impact all amdgpu devices.
May I know which device/asic has this issue ?
other words, you'd better move your changes into smu side as well (likes smu_v13_xx_ppt.c).
Best Regards,
Kevin
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Shikang Fan
Sent: 2022年11月25日 15:15
To: [email protected]
Cc: Fan, Shikang <[email protected]>
Subject: [PATCH] drm/amdgpu: fix for set df cstate failed under sriov
- set_df_cstate won't be called under sriov case.
Signed-off-by Shikang Fan <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +9 -7
@@ -2943,13 +2943,15 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)amdgpu_device_set_pg_state (adev,AMD_PG_STATE_UNGATE );amdgpu_device_set_cg_state (adev,AMD_CG_STATE_UNGATE ); -/* -* Per PMFW team's suggestion, driver needs to handle gfxoff -* and df cstate features disablement for gpu reset(e.g. Mode1Reset) -* scenario. Add the missing df cstate disablement here. -*/ -if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW )) -dev_warn (adev->dev,"Failed to disallow df cstate" ); +if (!amdgpu_sriov_vf (adev)) { +/* +* Per PMFW team's suggestion, driver needs to handle gfxoff +* and df cstate features disablement for gpu reset(e.g. Mode1Reset) +* scenario. Add the missing df cstate disablement here. +*/ +if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW )) +dev_warn (adev->dev,"Failed to disallow df cstate" ); + }for (i = adev->num_ip_blocks -1 ; i >=0 ; i--) {if (!adev->ip_blocks[i].status.valid)
--
2.25.1