aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2025-07-24 12:52:56 +0530
committerAlex Deucher <alexander.deucher@amd.com>2025-08-04 14:42:21 -0400
commit5c2b3226d00b5da63080ad0387481f66a024c635 (patch)
tree0565f9f48a3ec5a2dc14f8f9e1ec08344b13fbfd /drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h
parentdrm/amd/pm: Allow static metrics table query in VF (diff)
downloadlinux-5c2b3226d00b5da63080ad0387481f66a024c635.tar.gz
linux-5c2b3226d00b5da63080ad0387481f66a024c635.zip
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