[PATCH 3/3] drm/amdgpu: Prevent hardware access in dpc state

Sun, Ce(Overlord) Ce.Sun at amd.com
Fri Aug 1 15:40:26 UTC 2025


[AMD Official Use Only - AMD Internal Distribution Only]

the series :
reviewed-by Ce Sun <cesun102 at amd.com>

获取 Outlook for iOS<https://aka.ms/o0ukef>
________________________________
发件人: Lazar, Lijo <Lijo.Lazar at amd.com>
发送时间: Thursday, July 31, 2025 2:14:07 PM
收件人: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
抄送: Zhang, Hawking <Hawking.Zhang at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Sun, Ce(Overlord) <Ce.Sun at amd.com>
主题: [PATCH 3/3] drm/amdgpu: Prevent hardware access in dpc state

Don't allow hardware access while in dpc state.

Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ----
 drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h  | 1 +
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 076ad472a95e..cfd72faec16e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -6264,11 +6264,7 @@ static int amdgpu_device_asic_reset(struct amdgpu_device *adev,

 retry:  /* Rest of adevs pre asic reset from XGMI hive. */
         list_for_each_entry(tmp_adev, device_list, reset_list) {
-               if (amdgpu_reset_in_dpc(adev))
-                       tmp_adev->no_hw_access = true;
                 r = amdgpu_device_pre_asic_reset(tmp_adev, reset_context);
-               if (amdgpu_reset_in_dpc(adev))
-                       tmp_adev->no_hw_access = false;
                 /*TODO Should we stop ?*/
                 if (r) {
                         dev_err(tmp_adev->dev, "GPU pre asic reset failed with err, %d for drm dev, %s ",
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
index 3a806953338f..2f92b3be40f5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
@@ -164,6 +164,7 @@ static inline void amdgpu_reset_set_dpc_status(struct amdgpu_device *adev,
                                                bool status)
 {
         adev->pcie_reset_ctx.occurs_dpc = status;
+       adev->no_hw_access = status;
 }

 static inline bool amdgpu_reset_in_dpc(struct amdgpu_device *adev)
--
2.49.0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20250801/f2c4c5fa/attachment.htm>


More information about the amd-gfx mailing list