* [PATCH] drm/msm/adreno/a6xx: Fix HFI clock votes
@ 2018-08-03 14:39 Jordan Crouse
0 siblings, 0 replies; only message in thread
From: Jordan Crouse @ 2018-08-03 14:39 UTC (permalink / raw)
To: robdclark-Re5JQEeQqe8AvxtiuMwx3w,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
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 <jcrouse@codeaurora.org>
---
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(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 9ecd7afe6321..c49ca275a3b3 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -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;
}
}
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
index 221eaafc8b5f..f19ef4cb6ea4 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
@@ -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),
--
2.18.0
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-03 14:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-03 14:39 [PATCH] drm/msm/adreno/a6xx: Fix HFI clock votes Jordan Crouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).