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

Commit 06ed4f12 authored by Lucille Sylvester's avatar Lucille Sylvester Committed by George Shen
Browse files

msm: kgsl: Enable dynamic bus scaling for the GPU



With the addition of GMU it is no longer known by KGSL
if the bus is on or off.  Do not allow the on/off bus
flag to affect decisions on GMU targets.

CRs-Fixed: 2062271
Change-Id: I1fccdeee5fa94ac9dea8ae1c424d97650a5b3756
Signed-off-by: default avatarLucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: default avatarOleg Perelet <operelet@codeaurora.org>
Signed-off-by: default avatarGeorge Shen <sqiao@codeaurora.org>
parent 5f300da0
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ static int kgsl_bus_scale_request(struct kgsl_device *device,
{
	struct gmu_device *gmu = &device->gmu;
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;
	int ret;
	int ret = 0;

	/* GMU scales BW */
	if (kgsl_gmu_isenabled(device)) {
@@ -232,7 +232,7 @@ static int kgsl_bus_scale_request(struct kgsl_device *device,
			return 0;

		ret = gmu_dcvs_set(gmu, INVALID_DCVS_IDX, buslevel);
	} else {
	} else if (pwr->pcl) {
		/* Linux bus driver scales BW */
		ret = msm_bus_scale_client_update_request(pwr->pcl, buslevel);
	}
@@ -291,7 +291,8 @@ void kgsl_pwrctrl_buslevel_update(struct kgsl_device *device,
	unsigned long ab;

	/* the bus should be ON to update the active frequency */
	if (on && !(test_bit(KGSL_PWRFLAGS_AXI_ON, &pwr->power_flags)))
	if (!(kgsl_gmu_isenabled(device)) && on &&
		!(test_bit(KGSL_PWRFLAGS_AXI_ON, &pwr->power_flags)))
		return;
	/*
	 * If the bus should remain on calculate our request and submit it,
@@ -321,8 +322,6 @@ void kgsl_pwrctrl_buslevel_update(struct kgsl_device *device,
		msm_bus_scale_client_update_request(pwr->ocmem_pcl,
			on ? pwr->active_pwrlevel : pwr->num_pwrlevels - 1);

	/* vote for bus if gpubw-dev support is not enabled */
	if (pwr->pcl)
	kgsl_bus_scale_request(device, buslevel);

	kgsl_pwrctrl_vbif_update(ab);