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

Commit 0e88ce3e authored by Mihir Patel's avatar Mihir Patel Committed by Matt Wagantall
Browse files

msm: kgsl: Update GPU bus vote if AB or IB value is changed



Right now AB vote is not updated if IB remains same. This change
removes that constraint and updates bus vote if any of AB or IB
value is changed.

Change-Id: I16df45301011f088b0dfa88c3e8ba1a938f003b6
Signed-off-by: default avatarMihir Patel <mihirp@codeaurora.org>
parent f7e4bb44
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -675,6 +675,7 @@ int kgsl_busmon_target(struct device *dev, unsigned long *freq, u32 flags)
	struct kgsl_pwrlevel *pwr_level;
	int  level, b;
	u32 bus_flag;
	unsigned long ab_mbytes;

	if (device == NULL)
		return -ENODEV;
@@ -693,6 +694,7 @@ int kgsl_busmon_target(struct device *dev, unsigned long *freq, u32 flags)
	pwr_level = &pwr->pwrlevels[level];
	bus_flag = device->pwrscale.bus_profile.flag;
	device->pwrscale.bus_profile.flag = 0;
	ab_mbytes = device->pwrscale.bus_profile.ab_mbytes;

	/*
	 * Bus devfreq governor has calculated its recomendations
@@ -713,9 +715,10 @@ int kgsl_busmon_target(struct device *dev, unsigned long *freq, u32 flags)
		((pwr_level->bus_freq + pwr->bus_mod) > pwr_level->bus_min))
			pwr->bus_mod--;

	if (pwr->bus_mod != b) {
	/* Update bus vote if AB or IB is modified */
	if ((pwr->bus_mod != b) || (pwr->bus_ab_mbytes != ab_mbytes)) {
		pwr->bus_percent_ab = device->pwrscale.bus_profile.percent_ab;
		pwr->bus_ab_mbytes =  device->pwrscale.bus_profile.ab_mbytes;
		pwr->bus_ab_mbytes = ab_mbytes;
		kgsl_pwrctrl_buslevel_update(device, true);
	}