aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
diff options
context:
space:
mode:
authorLijo Lazar <[email protected]>2024-11-15 05:38:02 +0000
committerAlex Deucher <[email protected]>2024-11-20 15:03:05 +0000
commita86e0c0e94373aebc39c2efedaefc408f6a49fe3 (patch)
tree62d99ef9c5e922fd60bd065c91a2e44e82889ceb /drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
parentdrm/amdgpu/pm: add gen5 display to the user on smu v14.0.2/3 (diff)
downloadkernel-a86e0c0e94373aebc39c2efedaefc408f6a49fe3.tar.gz
kernel-a86e0c0e94373aebc39c2efedaefc408f6a49fe3.zip
drm/amdgpu: Add init level for post reset reinit
When device needs to be reset before initialization, it's not required for all IPs to be initialized before a reset. In such cases, it needs to identify whether the IP/feature is initialized for the first time or whether it's reinitialized after a reset. Add RESET_RECOVERY init level to identify post reset reinitialization phase. This only provides a device level identification, IP/features may choose to track their state independently also. Signed-off-by: Lijo Lazar <[email protected]> Acked-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
index 24dae7cdbe95..a0acb65f4b40 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
@@ -342,3 +342,8 @@ void amdgpu_reset_get_desc(struct amdgpu_reset_context *rst_ctxt, char *buf,
strscpy(buf, "unknown", len);
}
}
+
+bool amdgpu_reset_in_recovery(struct amdgpu_device *adev)
+{
+ return (adev->init_lvl->level == AMDGPU_INIT_LEVEL_RESET_RECOVERY);
+}