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

Commit 5e696e6a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "adreno_tz: Fix divide by zero problem in gpu_load_show()"

parents 5ffab080 a7f40143
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -92,13 +92,14 @@ static ssize_t gpu_load_show(struct device *dev,
		struct device_attribute *attr,
		char *buf)
{
	unsigned long sysfs_busy_perc;
	unsigned long sysfs_busy_perc = 0;
	/*
	 * Average out the samples taken since last read
	 * This will keep the average value in sync with
	 * with the client sampling duration.
	 */
	spin_lock(&sample_lock);
	if (acc_total)
		sysfs_busy_perc = (acc_relative_busy * 100) / acc_total;

	/* Reset the parameters */