@@ -963,14 +963,14 @@ static void get_wave_count(struct amdgpu_device *adev, int queue_idx,
963963 */
964964 pipe_idx = queue_idx / adev -> gfx .mec .num_queue_per_pipe ;
965965 queue_slot = queue_idx % adev -> gfx .mec .num_queue_per_pipe ;
966- soc15_grbm_select (adev , 1 , pipe_idx , queue_slot , 0 , inst );
967- reg_val = RREG32_SOC15_IP (GC , SOC15_REG_OFFSET (GC , inst ,
966+ soc15_grbm_select (adev , 1 , pipe_idx , queue_slot , 0 , GET_INST ( GC , inst ) );
967+ reg_val = RREG32_SOC15_IP (GC , SOC15_REG_OFFSET (GC , GET_INST ( GC , inst ) ,
968968 mmSPI_CSQ_WF_ACTIVE_COUNT_0 ) + queue_slot );
969969 wave_cnt = reg_val & SPI_CSQ_WF_ACTIVE_COUNT_0__COUNT_MASK ;
970970 if (wave_cnt != 0 ) {
971971 queue_cnt -> wave_cnt += wave_cnt ;
972972 queue_cnt -> doorbell_off =
973- (RREG32_SOC15 (GC , inst , mmCP_HQD_PQ_DOORBELL_CONTROL ) &
973+ (RREG32_SOC15 (GC , GET_INST ( GC , inst ) , mmCP_HQD_PQ_DOORBELL_CONTROL ) &
974974 CP_HQD_PQ_DOORBELL_CONTROL__DOORBELL_OFFSET_MASK ) >>
975975 CP_HQD_PQ_DOORBELL_CONTROL__DOORBELL_OFFSET__SHIFT ;
976976 }
@@ -1033,7 +1033,7 @@ void kgd_gfx_v9_get_cu_occupancy(struct amdgpu_device *adev,
10331033 DECLARE_BITMAP (cp_queue_bitmap , AMDGPU_MAX_QUEUES );
10341034
10351035 lock_spi_csq_mutexes (adev );
1036- soc15_grbm_select (adev , 1 , 0 , 0 , 0 , inst );
1036+ soc15_grbm_select (adev , 1 , 0 , 0 , 0 , GET_INST ( GC , inst ) );
10371037
10381038 /*
10391039 * Iterate through the shader engines and arrays of the device
@@ -1046,7 +1046,7 @@ void kgd_gfx_v9_get_cu_occupancy(struct amdgpu_device *adev,
10461046 se_cnt = adev -> gfx .config .max_shader_engines ;
10471047 for (se_idx = 0 ; se_idx < se_cnt ; se_idx ++ ) {
10481048 amdgpu_gfx_select_se_sh (adev , se_idx , 0 , 0xffffffff , inst );
1049- queue_map = RREG32_SOC15 (GC , inst , mmSPI_CSQ_WF_ACTIVE_STATUS );
1049+ queue_map = RREG32_SOC15 (GC , GET_INST ( GC , inst ) , mmSPI_CSQ_WF_ACTIVE_STATUS );
10501050
10511051 /*
10521052 * Assumption: queue map encodes following schema: four
@@ -1071,7 +1071,7 @@ void kgd_gfx_v9_get_cu_occupancy(struct amdgpu_device *adev,
10711071 }
10721072
10731073 amdgpu_gfx_select_se_sh (adev , 0xffffffff , 0xffffffff , 0xffffffff , inst );
1074- soc15_grbm_select (adev , 0 , 0 , 0 , 0 , inst );
1074+ soc15_grbm_select (adev , 0 , 0 , 0 , 0 , GET_INST ( GC , inst ) );
10751075 unlock_spi_csq_mutexes (adev );
10761076
10771077 /* Update the output parameters and return */
0 commit comments