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

Commit c217d4d2 authored by Lucille Sylvester's avatar Lucille Sylvester Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Do not reset bus/GPU frequency ratio



Currently all GPU frequency changes reset the bus to a default
vote for the new GPU level.  If the bus is high compared to the
GPU level, leave it high for the new level.  This should help
prevent frequency cycling issues.

Change-Id: Id908519cbe669aa8ccc3b6ea580c96b88b229ef5
Signed-off-by: default avatarLucille Sylvester <lsylvest@codeaurora.org>
parent b940677f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -344,11 +344,17 @@ void kgsl_pwrctrl_pwrlevel_change(struct kgsl_device *device,
	pwr->previous_pwrlevel = old_level;

	/*
	 * Update the bus before the GPU clock to prevent underrun during
	 * frequency increases.
	 * If the bus is running faster than its default level and the GPU
	 * frequency is moving down keep the DDR at a relatively high level.
	 */
	if (pwr->bus_mod < 0 || new_level < old_level) {
		pwr->bus_mod = 0;
		pwr->bus_percent_ab = 0;
	}
	/*
	 * Update the bus before the GPU clock to prevent underrun during
	 * frequency increases.
	 */
	kgsl_pwrctrl_buslevel_update(device, true);

	pwrlevel = &pwr->pwrlevels[pwr->active_pwrlevel];