summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2025-07-24 10:22:56 +0300
committerAlex Deucher <alexander.deucher@amd.com>2025-08-04 21:42:21 +0300
commit5c2b3226d00b5da63080ad0387481f66a024c635 (patch)
tree0565f9f48a3ec5a2dc14f8f9e1ec08344b13fbfd /drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
parent9b331f0f60832c01939b4c46f66d24eca3917c3d (diff)
downloadlinux-5c2b3226d00b5da63080ad0387481f66a024c635.tar.xz
drm/amdgpu: Add wrapper function for dpc state
Use wrapper functions to set/indicate dpc status. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Ce Sun <cesun102@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
index 4d9b9701139b..3a806953338f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
@@ -160,4 +160,15 @@ int amdgpu_reset_do_xgmi_reset_on_init(
bool amdgpu_reset_in_recovery(struct amdgpu_device *adev);
+static inline void amdgpu_reset_set_dpc_status(struct amdgpu_device *adev,
+ bool status)
+{
+ adev->pcie_reset_ctx.occurs_dpc = status;
+}
+
+static inline bool amdgpu_reset_in_dpc(struct amdgpu_device *adev)
+{
+ return adev->pcie_reset_ctx.occurs_dpc;
+}
+
#endif