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

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

Merge "msm: kgsl: Do not return invalid power stats when the device is off"

parents 5be32fa2 3371b80a
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -3273,12 +3273,16 @@ static void adreno_power_stats(struct kgsl_device *device,
	struct adreno_busy_data busy_data;

	memset(stats, 0, sizeof(*stats));

	/*
	 * Get the busy cycles counted since the counter was last reset.
	 * If we're not currently active, there shouldn't have been
	 * any cycles since the last time this function was called.
	 */
	if (device->state == KGSL_STATE_ACTIVE)

	if (device->state != KGSL_STATE_ACTIVE)
		return;

	/* Get the busy cycles counted since the counter was last reset */
	gpudev->busy_cycles(adreno_dev, &busy_data);

	stats->busy_time = adreno_ticks_to_us(busy_data.gpu_busy,