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

Commit 3ce60773 authored by Carter Cooper's avatar Carter Cooper Committed by Gerrit - the friendly Code Review server
Browse files

devfreq: Use busy cycles only for GPU bandwidth decisions



Remove using the waiting bandwidth cycles for deciding
when to change bandwidth levels.

Change-Id: I65341c5c115684f19b5a3b2522d362e80315f2c9
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
parent 0389e5ba
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ static int devfreq_gpubw_get_target(struct devfreq *df,
	int result;
	int level = 0;
	int act_level;
	int norm_max_cycles;
	int norm_cycles;
	int gpu_percent;
	/*
@@ -86,6 +87,8 @@ static int devfreq_gpubw_get_target(struct devfreq *df,
	if (priv->bus.total_time < LONG_FLOOR)
		return result;

	norm_max_cycles = (unsigned int)(priv->bus.ram_time) /
			(unsigned int) priv->bus.total_time;
	norm_cycles = (unsigned int)(priv->bus.ram_time + priv->bus.ram_wait) /
			(unsigned int) priv->bus.total_time;
	gpu_percent = (100 * (unsigned int)priv->bus.gpu_time) /
@@ -96,8 +99,8 @@ static int devfreq_gpubw_get_target(struct devfreq *df,
	 * FAST hint.  Otherwise check the current value against the current
	 * cutoffs.
	 */
	if (norm_cycles > priv->bus.max) {
		_update_cutoff(priv, norm_cycles);
	if (norm_max_cycles > priv->bus.max) {
		_update_cutoff(priv, norm_max_cycles);
		bus_profile->flag = DEVFREQ_FLAG_FAST_HINT;
	} else {
		/* GPU votes for IB not AB so don't under vote the system */