summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorJonathan Kim <jonathan.kim@amd.com>2019-06-19 23:56:25 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-06-20 11:36:22 -0500
commit9c7c85f7ea1fe55e9406858e3ca32a51494bd02e (patch)
treed097140f5873497999fbaad971ac35beb02e13a0 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parente4cf4bf5b876df83ad42604e21337eb3e7dfa52c (diff)
downloadlinux-9c7c85f7ea1fe55e9406858e3ca32a51494bd02e.tar.bz2
drm/amdgpu: add pmu counters
adding perf event counters Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e26303bc567e..e6ddd30f31a6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -61,6 +61,7 @@
#include "amdgpu_xgmi.h"
#include "amdgpu_ras.h"
+#include "amdgpu_pmu.h"
MODULE_FIRMWARE("amdgpu/vega10_gpu_info.bin");
MODULE_FIRMWARE("amdgpu/vega12_gpu_info.bin");
@@ -2746,6 +2747,10 @@ fence_driver_init:
return r;
}
+ r = amdgpu_pmu_init(adev);
+ if (r)
+ dev_err(adev->dev, "amdgpu_pmu_init failed\n");
+
return 0;
failed:
@@ -2814,6 +2819,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
amdgpu_debugfs_regs_cleanup(adev);
device_remove_file(adev->dev, &dev_attr_pcie_replay_count);
amdgpu_ucode_sysfs_fini(adev);
+ amdgpu_pmu_fini(adev);
}