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

Commit 07550733 authored by George Shen's avatar George Shen
Browse files

msm: kgsl: Converts A6XX power counter value to microseconds



GPU DCVS needs power counter value in microseconds for
workload calculation. On A6XX, the power counter sourced
from XO clock instead of GFX3D clock. The conversion needs
adaptation.

CRs-Fixed: 2017390
Change-Id: I9ebaaa549d544322a419331d48a138e846795bd1
Signed-off-by: default avatarGeorge Shen <sqiao@codeaurora.org>
parent 92b0fef6
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2855,9 +2855,15 @@ static void adreno_power_stats(struct kgsl_device *device,
			gpu_busy += adj;
		}

		if (kgsl_gmu_isenabled(device)) {
			/* clock sourced from XO */
			stats->busy_time = gpu_busy * 10 / 192;
		} else {
			/* clock sourced from GFX3D */
			stats->busy_time = adreno_ticks_to_us(gpu_busy,
				kgsl_pwrctrl_active_freq(pwr));
		}
	}

	if (device->pwrctrl.bus_control) {
		uint64_t ram_cycles = 0, starved_ram = 0;