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

Commit a54ebbb3 authored by Sushmita Susheelendra's avatar Sushmita Susheelendra
Browse files

msm: kgsl: Only read throttle counters if GMU is enabled



Throttle counters are only used with GMU.
Platforms without the GMU should return early
without reading them.

Change-Id: I0df614439c0629afbc7a1ebaca279e4a1042949d
Signed-off-by: default avatarSushmita Susheelendra <ssusheel@codeaurora.org>
parent 7f7615a7
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1449,6 +1449,9 @@ static int64_t a6xx_read_throttling_counters(struct adreno_device *adreno_dev)
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	struct gmu_device *gmu = KGSL_GMU_DEVICE(device);
	struct gmu_device *gmu = KGSL_GMU_DEVICE(device);


	if (!gmu_core_isenabled(device))
		return 0;

	for (i = 0; i < ARRAY_SIZE(counts); i++) {
	for (i = 0; i < ARRAY_SIZE(counts); i++) {
		if (!adreno_dev->gpmu_throttle_counters[i])
		if (!adreno_dev->gpmu_throttle_counters[i])
			counts[i] = 0;
			counts[i] = 0;