drm/amdgpu: use IP version check in sysfs creation conditional logic
Subsystems (2)
PATCH 1/1 drm/amdgpu: use IP version check in sysfs creation conditional logic
avoid sysfs node creation faults when performing NPS mode switching
Signed-off-by Ce Sun <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -3
@@ -3788,9 +3788,11 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev, goto cleanup; } -if (amdgpu_uniras_enabled (adev) || (ras_obj->hw_ops && - (ras_obj->hw_ops->query_ras_error_count || - ras_obj->hw_ops->query_ras_error_status))) { +if ((ras_obj->hw_ops && (ras_obj->hw_ops->query_ras_error_count || + ras_obj->hw_ops->query_ras_error_status)) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,14 ) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,12 ) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,6 )) { r =amdgpu_ras_sysfs_create (adev, ras_block);if (r) goto interrupt;
Signature · 1 line
2.34.1
AMD General
We can set uniras_enabled earlier in the next step, anyway, the patch is:
Reviewed-by Tao Zhou <[email protected]>
Quoted 40 lines
-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]>
Sent: Thursday, July 9, 2026 2:24 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Sun, Ce(Overlord) <[email protected]>
Subject: [PATCH] drm/amdgpu: use IP version check in sysfs creation conditional logicavoid sysfs node creation faults when performing NPS mode switching
Signed-off-by Ce Sun <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5
-3@@ -3788,9 +3788,11 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev, goto cleanup; } -if (amdgpu_uniras_enabled (adev) || (ras_obj->hw_ops && - (ras_obj->hw_ops->query_ras_error_count || - ras_obj->hw_ops->query_ras_error_status))) { +if ((ras_obj->hw_ops && (ras_obj->hw_ops->query_ras_error_count || + ras_obj->hw_ops->query_ras_error_status)) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,14 ) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,12 ) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,6 )) { r =amdgpu_ras_sysfs_create (adev, ras_block);if (r)goto interrupt;--
2.34.1