diff options
| author | Lijo Lazar <[email protected]> | 2025-05-29 07:19:30 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-06-18 16:19:02 +0000 |
| commit | 196aefea44aa3f7f2dc93df637bc319139eea713 (patch) | |
| tree | f169bc1dd44736e635013a560629fdd98bb8dc66 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | drm/amdgpu: Enable IFWI update support for PSPv14.0.2 and v14.0.3 (diff) | |
| download | kernel-196aefea44aa3f7f2dc93df637bc319139eea713.tar.gz kernel-196aefea44aa3f7f2dc93df637bc319139eea713.zip | |
drm/amdgpu: Check pcie replays reporting support
Check if pcie replay count reporting is supported before creating sysfs
attribute.
Signed-off-by: Lijo Lazar <[email protected]>
Acked-by: Mangesh Gadre <[email protected]>
Reviewed-by: Asad Kamal <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 6715d76ad03a..13708dc7706a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -232,7 +232,7 @@ static int amdgpu_device_attr_sysfs_init(struct amdgpu_device *adev) { int ret = 0; - if (!amdgpu_sriov_vf(adev)) + if (amdgpu_nbio_is_replay_cnt_supported(adev)) ret = sysfs_create_file(&adev->dev->kobj, &dev_attr_pcie_replay_count.attr); @@ -241,7 +241,7 @@ static int amdgpu_device_attr_sysfs_init(struct amdgpu_device *adev) static void amdgpu_device_attr_sysfs_fini(struct amdgpu_device *adev) { - if (!amdgpu_sriov_vf(adev)) + if (amdgpu_nbio_is_replay_cnt_supported(adev)) sysfs_remove_file(&adev->dev->kobj, &dev_attr_pcie_replay_count.attr); } |
