mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
drm/amdkfd: Fix reg offset for setting CWSR grace period
This patch fixes the case where the code currently passes absolute register address and not the reg offset, which HWS expects, when sending the PM4 packet to set/update CWSR grace period. Additionally, cleanup the signature of build_grace_period_packet_info function as it no longer needs the inst parameter. Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Jonathan Kim <jonathan.kim@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
afaf2b3802
commit
81faf9e0c3
@ -980,8 +980,7 @@ void kgd_gfx_v10_build_grace_period_packet_info(struct amdgpu_device *adev,
|
||||
uint32_t wait_times,
|
||||
uint32_t grace_period,
|
||||
uint32_t *reg_offset,
|
||||
uint32_t *reg_data,
|
||||
uint32_t inst)
|
||||
uint32_t *reg_data)
|
||||
{
|
||||
*reg_data = wait_times;
|
||||
|
||||
|
@ -55,5 +55,4 @@ void kgd_gfx_v10_build_grace_period_packet_info(struct amdgpu_device *adev,
|
||||
uint32_t wait_times,
|
||||
uint32_t grace_period,
|
||||
uint32_t *reg_offset,
|
||||
uint32_t *reg_data,
|
||||
uint32_t inst);
|
||||
uint32_t *reg_data);
|
||||
|
@ -1103,8 +1103,7 @@ void kgd_gfx_v9_build_grace_period_packet_info(struct amdgpu_device *adev,
|
||||
uint32_t wait_times,
|
||||
uint32_t grace_period,
|
||||
uint32_t *reg_offset,
|
||||
uint32_t *reg_data,
|
||||
uint32_t inst)
|
||||
uint32_t *reg_data)
|
||||
{
|
||||
*reg_data = wait_times;
|
||||
|
||||
@ -1120,8 +1119,7 @@ void kgd_gfx_v9_build_grace_period_packet_info(struct amdgpu_device *adev,
|
||||
SCH_WAVE,
|
||||
grace_period);
|
||||
|
||||
*reg_offset = SOC15_REG_OFFSET(GC, GET_INST(GC, inst),
|
||||
mmCP_IQ_WAIT_TIME2);
|
||||
*reg_offset = SOC15_REG_OFFSET(GC, 0, mmCP_IQ_WAIT_TIME2);
|
||||
}
|
||||
|
||||
void kgd_gfx_v9_program_trap_handler_settings(struct amdgpu_device *adev,
|
||||
|
@ -100,5 +100,4 @@ void kgd_gfx_v9_build_grace_period_packet_info(struct amdgpu_device *adev,
|
||||
uint32_t wait_times,
|
||||
uint32_t grace_period,
|
||||
uint32_t *reg_offset,
|
||||
uint32_t *reg_data,
|
||||
uint32_t inst);
|
||||
uint32_t *reg_data);
|
||||
|
@ -1677,8 +1677,7 @@ static int start_cpsch(struct device_queue_manager *dqm)
|
||||
dqm->dev->kfd2kgd->build_grace_period_packet_info(
|
||||
dqm->dev->adev, dqm->wait_times,
|
||||
grace_period, ®_offset,
|
||||
&dqm->wait_times,
|
||||
ffs(dqm->dev->xcc_mask) - 1);
|
||||
&dqm->wait_times);
|
||||
}
|
||||
|
||||
dqm_unlock(dqm);
|
||||
|
@ -299,8 +299,7 @@ static int pm_set_grace_period_v9(struct packet_manager *pm,
|
||||
pm->dqm->wait_times,
|
||||
grace_period,
|
||||
®_offset,
|
||||
®_data,
|
||||
0);
|
||||
®_data);
|
||||
|
||||
if (grace_period == USE_DEFAULT_GRACE_PERIOD)
|
||||
reg_data = pm->dqm->wait_times;
|
||||
|
@ -326,8 +326,7 @@ struct kfd2kgd_calls {
|
||||
uint32_t wait_times,
|
||||
uint32_t grace_period,
|
||||
uint32_t *reg_offset,
|
||||
uint32_t *reg_data,
|
||||
uint32_t inst);
|
||||
uint32_t *reg_data);
|
||||
void (*get_cu_occupancy)(struct amdgpu_device *adev, int pasid,
|
||||
int *wave_cnt, int *max_waves_per_cu, uint32_t inst);
|
||||
void (*program_trap_handler_settings)(struct amdgpu_device *adev,
|
||||
|
Loading…
Reference in New Issue
Block a user