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_nbio.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_nbio.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c index d085687a47ea..e56ba93a8df6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c @@ -53,6 +53,15 @@ u64 amdgpu_nbio_get_pcie_replay_count(struct amdgpu_device *adev) return 0; } +bool amdgpu_nbio_is_replay_cnt_supported(struct amdgpu_device *adev) +{ + if (amdgpu_sriov_vf(adev) || !adev->asic_funcs->get_pcie_replay_count || + (!adev->nbio.funcs || !adev->nbio.funcs->get_pcie_replay_count)) + return false; + + return true; +} + int amdgpu_nbio_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block) { int r; |
