RE: [PATCH] drm/amdgpu: fix for set df cstate failed under sriov

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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 <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Shikang Fan
Sent: 2022年11月25日 15:15
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Fan, Shikang <Shikang.Fan@xxxxxxx>
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 <shikang.fan@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 818fa72c670d..c557585aa46c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -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

<<attachment: winmail.dat>>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux