summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
diff options
context:
space:
mode:
authorAsad Kamal <asad.kamal@amd.com>2023-07-28 17:58:54 +0800
committerAlex Deucher <alexander.deucher@amd.com>2023-08-09 09:46:05 -0400
commit8d759dc6644df4141a151293cb0e77fd8ca379ed (patch)
tree0066fcb8ea23c8afb46ff95c68e1e06ea548ca3e /drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
parentbc0f80802d735950738167e2cc0b51b0dd41e68d (diff)
drm/amdgpu: Add pcie usage callback to nbio
Add a callback in nbio to get pcie usage Signed-off-by: Asad Kamal <asad.kamal@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Shiwu Zhang <shiwu.zhang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c8
1 files changed, 8 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..51ca544a7094 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
@@ -53,6 +53,14 @@ u64 amdgpu_nbio_get_pcie_replay_count(struct amdgpu_device *adev)
return 0;
}
+void amdgpu_nbio_get_pcie_usage(struct amdgpu_device *adev, uint64_t *count0,
+ uint64_t *count1)
+{
+ if (adev->nbio.funcs->get_pcie_usage)
+ adev->nbio.funcs->get_pcie_usage(adev, count0, count1);
+
+}
+
int amdgpu_nbio_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block)
{
int r;