AMD General We can set uniras_enabled earlier in the next step, anyway, the patch is:
Reviewed-by: Tao Zhou <[email protected]> > -----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 > 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(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > index 0183b2622d50..631afb5c10b4 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > @@ -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
