mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-24 10:11:25 -04:00
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 <cesun102@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -3777,8 +3777,11 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev,
|
||||
}
|
||||
|
||||
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))) {
|
||||
(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;
|
||||
|
||||
Reference in New Issue
Block a user