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

Commit 3c704847 authored by George Shen's avatar George Shen
Browse files

msm: kgsl: Vote GPU bandwidth and frequency together



A6XX V1 GMU based DCVS requires that bandwidth and
GPU frequency scale together.

CRs-Fixed: 2062271
Change-Id: If56ab603cf1c8f14989d17987dd62c9e0bcfb793
Signed-off-by: default avatarGeorge Shen <sqiao@codeaurora.org>
parent 2d19be1f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -436,6 +436,7 @@ int gmu_dcvs_set(struct gmu_device *gmu,
	struct kgsl_device *device = container_of(gmu, struct kgsl_device, gmu);
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev);
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;
	int perf_idx = INVALID_DCVS_IDX, bw_idx = INVALID_DCVS_IDX;

	if (gpu_pwrlevel < gmu->num_gpupwrlevels)
@@ -448,6 +449,10 @@ int gmu_dcvs_set(struct gmu_device *gmu,
		(bw_idx == INVALID_DCVS_IDX))
		return -EINVAL;

	if (bw_idx == INVALID_DCVS_IDX)
		/* Use default BW, algorithm changes on V2 */
		bw_idx = pwr->pwrlevels[gpu_pwrlevel].bus_freq;

	if (ADRENO_QUIRK(adreno_dev, ADRENO_QUIRK_HFI_USE_REG))
		return gpudev->rpmh_gpu_pwrctrl(adreno_dev,
			GMU_DCVS_NOHFI, perf_idx, bw_idx);