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

Commit f920d24e authored by zeroblade1984's avatar zeroblade1984 Committed by Harshit Jain
Browse files

gpu: Play with throttling a bit



See if this helps reduce lags when GPU is throttling due to temp limitations.

Signed-off-by: default avatarzeroblade1984 <zeroblade1984@gmail.com>
parent 554479d4
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -642,8 +642,8 @@ static ssize_t kgsl_pwrctrl_thermal_pwrlevel_store(struct device *dev,


	mutex_lock(&device->mutex);
	mutex_lock(&device->mutex);


	if (level > pwr->num_pwrlevels - 2)
	if (level > pwr->num_pwrlevels - 1)
		level = pwr->num_pwrlevels - 2;
		level = pwr->num_pwrlevels - 1;


	pwr->thermal_pwrlevel = level;
	pwr->thermal_pwrlevel = level;


@@ -721,8 +721,8 @@ static void kgsl_pwrctrl_min_pwrlevel_set(struct kgsl_device *device,
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;


	mutex_lock(&device->mutex);
	mutex_lock(&device->mutex);
	if (level > pwr->num_pwrlevels - 2)
	if (level > pwr->num_pwrlevels - 1)
		level = pwr->num_pwrlevels - 2;
		level = pwr->num_pwrlevels - 1;


	/* You can't set a minimum power level lower than the maximum */
	/* You can't set a minimum power level lower than the maximum */
	if (level < pwr->max_pwrlevel)
	if (level < pwr->max_pwrlevel)