drm/amd/amdgpu: Prepare implementation to support reporting of CU usage
authorRamesh Errabolu <Ramesh.Errabolu@amd.com>
Tue, 29 Sep 2020 17:06:15 +0000 (12:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Sep 2020 17:50:06 +0000 (13:50 -0400)
commit825c91d0908b72f9ec2a9e0c815d2c40af5ad5f4
tree623181a5ae9c6a6125e0c97a06d807781cb5e53c
parentb8810a142ad5494ecfe7ef2fa289868562918cd1
drm/amd/amdgpu: Prepare implementation to support reporting of CU usage

[Why]
Allow user to know number of compute units (CU) that are in use at any
given moment.

[How]
Read registers of SQ that give number of waves that are in flight
of various queues. Use this information to determine number of CU's
in use.

Signed-off-by: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.h