[PATCH] drm/amdgpu/jpeg - skip change of power-gating state for sriov

Luo, Zhigang Zhigang.Luo at amd.com
Thu Aug 17 15:02:58 UTC 2023


[AMD Official Use Only - General]

Reviewed-by: Zhigang Luo <zhigang.luo at amd.com>

-----Original Message-----
From: Dhume, Samir <Samir.Dhume at amd.com>
Sent: Wednesday, August 16, 2023 9:20 PM
To: amd-gfx at lists.freedesktop.org
Cc: Luo, Zhigang <Zhigang.Luo at amd.com>; Liu, Leo <Leo.Liu at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Dhume, Samir <Samir.Dhume at amd.com>
Subject: [PATCH] drm/amdgpu/jpeg - skip change of power-gating state for sriov

Signed-off-by: Samir Dhume <samir.dhume at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
index 15612915bb6c..1de79d660285 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
@@ -360,8 +360,10 @@ static int jpeg_v4_0_3_hw_fini(void *handle)

        cancel_delayed_work_sync(&adev->jpeg.idle_work);

-       if (adev->jpeg.cur_state != AMD_PG_STATE_GATE)
-               ret = jpeg_v4_0_3_set_powergating_state(adev, AMD_PG_STATE_GATE);
+       if (!amdgpu_sriov_vf(adev)) {
+               if (adev->jpeg.cur_state != AMD_PG_STATE_GATE)
+                       ret = jpeg_v4_0_3_set_powergating_state(adev, AMD_PG_STATE_GATE);
+       }

        return ret;
 }
--
2.34.1



More information about the amd-gfx mailing list