]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: add per device user friendly xgmi events for vega20
authorJonathan Kim <jonathan.kim@amd.com>
Wed, 2 Sep 2020 00:21:00 +0000 (20:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Oct 2020 18:44:33 +0000 (14:44 -0400)
commit8a331797704d288e0da0bc3bd45965ed133858d3
treef9d85d3f29242e901529fe31c5c1b9ffd9db7e8e
parent4f0d67542d26ac60cf6c9c3ab352943ca37cf744
drm/amdgpu: add per device user friendly xgmi events for vega20

Non-outbound data metrics are non useful so mark them as legacy.
Bucket new perf counters into device and not device ip.
Bind events to chip instead of IP.
Report available event counters and not number of hw counter banks.
Move DF public macros to private since not needed outside of IP version.

v5: cleanup by moving per chip configs into structs

v4: After more discussion, replace *_LEGACY references with IP references
to indicate concept of pmu-typed versus event-config-typed event
registration.

v3: attr groups const array is global but attr groups are allocated per
device which doesn't work and causes problems on memory allocation and
de-allocation for pmu unregister. Switch to building const attr groups
per pmu instead to simplify solution.

v2: add comments on sysfs structure and formatting.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Harish Kasiviswanathan <harish.kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.h
drivers/gpu/drm/amd/amdgpu/df_v3_6.c
drivers/gpu/drm/amd/amdgpu/df_v3_6.h