drm/msm/adreno/a6xx: Fix HFI clock votes
Subsystems (4)
PATCH 1/1 drm/msm/adreno/a6xx: Fix HFI clock votes
Fix two issues with the GPU clock vote on HFI. First, pick the largest non-zero arc value for the MX rail instead of just the maximum index (which is likely zero on sdm845). Secondly fix a typo that was blowing away the correct vote value in the GMU table.
Signed-off-by Jordan Crouse <[email protected]>
--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 ++++--- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +4 -3
@@ -904,14 +904,15 @@ static int a6xx_gmu_rpmh_arc_votes_init(struct device *dev, u32 *votes,/* * Look for a level in in the secondary list that matches. If -* nothing fits, use the maximum +* nothing fits, use the maximum non zero vote */ - sindex = sec_count -1 ; -for (j =0 ; j < sec_count -1 ; j++) { +for (j =0 ; j < sec_count; j++) {if (sec[j] >= level) { sindex = j;break ; + }else if (sec[j]) { + sindex = j; } }
drivers/gpu/drm/msm/adreno/a6xx_hfi.c +2 -2
@@ -255,12 +255,12 @@ static int a6xx_hfi_send_perf_table(struct a6xx_gmu *gmu)for (i =0 ; i < gmu->nr_gpu_freqs; i++) { msg.gx_votes[i].vote = gmu->gx_arc_votes[i]; - msg.gx_votes[i].vote = gmu->gpu_freqs[i] /1000 ; + msg.gx_votes[i].freq = gmu->gpu_freqs[i] /1000 ; }for (i =0 ; i < gmu->nr_gmu_freqs; i++) { msg.cx_votes[i].vote = gmu->cx_arc_votes[i]; - msg.cx_votes[i].vote = gmu->gmu_freqs[i] /1000 ; + msg.cx_votes[i].freq = gmu->gmu_freqs[i] /1000 ; } return a6xx_hfi_send_msg(gmu, HFI_H2F_MSG_PERF_TABLE, &msg, sizeof(msg),
Signature · 6 lines
2.18.0 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno