Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6af31ab4 authored by Kyle Piefer's avatar Kyle Piefer Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Correct adjustment calculation for LM on A640



The adjustment for DCVS due to LM is being calculated
incorrectly. The weighting of the first throttle count
should be 15%.

Change-Id: I5c8cae6900dee36e62251c9f5c3d6b4227b1e9ee
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
parent 7bebb138
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1427,7 +1427,7 @@ static int a6xx_soft_reset(struct adreno_device *adreno_dev)
static int64_t a6xx_read_throttling_counters(struct adreno_device *adreno_dev)
{
	int i;
	int64_t adj = 0;
	int64_t adj = -1;
	uint32_t counts[ADRENO_GPMU_THROTTLE_COUNTERS];
	struct adreno_busy_data *busy = &adreno_dev->busy_data;

@@ -1443,12 +1443,12 @@ static int64_t a6xx_read_throttling_counters(struct adreno_device *adreno_dev)
	/*
	 * The adjustment is the number of cycles lost to throttling, which
	 * is calculated as a weighted average of the cycles throttled
	 * at 10%, 50%, and 90%. The adjustment is negative because in A6XX,
	 * at 15%, 50%, and 90%. The adjustment is negative because in A6XX,
	 * the busy count includes the throttled cycles. Therefore, we want
	 * to remove them to prevent appearing to be busier than
	 * we actually are.
	 */
	adj = -((counts[0] * 1) + (counts[1] * 5) + (counts[2] * 9)) / 10;
	adj *= ((counts[0] * 15) + (counts[1] * 50) + (counts[2] * 90)) / 100;

	trace_kgsl_clock_throttling(0, counts[1], counts[2],
			counts[0], adj);