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

Commit f46f6185 authored by Hareesh Gundu's avatar Hareesh Gundu
Browse files

msm: kgsl: Enable GMU power counters if accessible



GMU power counters needs to be initialized to get the
proper busy cycles. If GMU is not enabled, the 
perfcounters are still accessible. Allow GMU power
counter initialization even if the GMU is disabled
to get the GPU busy cycles data.


Change-Id: I28cf83be45c32b1b24891b3a7d321834d157e092
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent dcb40bc8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2625,7 +2625,10 @@ static int a6xx_enable_pwr_counters(struct adreno_device *adreno_dev,
	if (counter == 0)
		return -EINVAL;

	if (!gmu_core_isenabled(device))
	/* We can use GPU without GMU and allow it to count GPU busy cycles */
	if (!gmu_core_isenabled(device) &&
			!kgsl_is_register_offset(device,
				A6XX_GPU_GMU_AO_GPU_CX_BUSY_MASK))
		return -ENODEV;

	kgsl_regwrite(device, A6XX_GPU_GMU_AO_GPU_CX_BUSY_MASK, 0xFF000000);