]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/amdgpu: Enable arcturus devices to access the method kgd_gfx_v9_get_cu_occupa...
authorRamesh Errabolu <Ramesh.Errabolu@amd.com>
Tue, 3 Nov 2020 00:15:03 +0000 (18:15 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 Nov 2020 22:10:17 +0000 (17:10 -0500)
[Why]
Allow user to know number of compute units (CU) that are in use at any
given moment.

[How]
Remove the keyword static for the method kgd_gfx_v9_get_cu_occupancy

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

index 1afa8f122e7d3b261115a5c628e50975d4490bdc..604757a1e44051dcd19583af7d723860afa154d4 100644 (file)
@@ -304,4 +304,5 @@ const struct kfd2kgd_calls arcturus_kfd2kgd = {
                                kgd_gfx_v9_get_atc_vmid_pasid_mapping_info,
        .set_vm_context_page_table_base =
                                kgd_gfx_v9_set_vm_context_page_table_base,
+       .get_cu_occupancy = kgd_gfx_v9_get_cu_occupancy
 };
index e0d5110701bd06721c8fb10dd9e4f8227f110f33..b75bf0bb05ae5fb3e5c8bd9719053b624008974d 100644 (file)
@@ -799,7 +799,7 @@ static void get_wave_count(struct amdgpu_device *adev, int queue_idx,
  *
  *  Reading registers referenced above involves programming GRBM appropriately
  */
-static void kgd_gfx_v9_get_cu_occupancy(struct kgd_dev *kgd, int pasid,
+void kgd_gfx_v9_get_cu_occupancy(struct kgd_dev *kgd, int pasid,
                int *pasid_wave_cnt, int *max_waves_per_cu)
 {
        int qidx;
index f098e88d3a0d379190c8b486b43d162cb88c1738..de9eca55b0efd15a6e64afb8bcd036dd0e940eb6 100644 (file)
@@ -63,3 +63,5 @@ bool kgd_gfx_v9_get_atc_vmid_pasid_mapping_info(struct kgd_dev *kgd,
 
 void kgd_gfx_v9_set_vm_context_page_table_base(struct kgd_dev *kgd,
                        uint32_t vmid, uint64_t page_table_base);
+void kgd_gfx_v9_get_cu_occupancy(struct kgd_dev *kgd, int pasid,
+               int *pasid_wave_cnt, int *max_waves_per_cu);