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

Commit 8103896c authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Add opp table to bus monitor device



Devfreq driver expects a opp table to be be part of the
device. So add the gpu opp table to register the devfreq
device for gpu bus dcvs.

Change-Id: I6ca6e29e2a7f3c22227dcd6490061eaf169e8a80
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 648dc229
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -924,7 +924,7 @@ int kgsl_pwrscale_init(struct device *dev, const char *governor)
	struct kgsl_pwrscale *pwrscale;
	struct kgsl_pwrctrl *pwr;
	struct devfreq *devfreq;
	struct devfreq *bus_devfreq;
	struct devfreq *bus_devfreq = NULL;
	struct msm_adreno_extended_profile *gpu_profile;
	struct devfreq_dev_profile *profile;
	struct devfreq_msm_adreno_tz_data *data;
@@ -1035,9 +1035,20 @@ int kgsl_pwrscale_init(struct device *dev, const char *governor)
		pwrscale->bus_profile.profile.freq_table
					= pwrscale->freq_table;

		/*
		 * This is needed because devfreq expects the device
		 * to have an opp table handle to calculate the min/max
		 * frequency.
		 */
		ret = dev_pm_opp_of_add_table(device->busmondev);
		if (!ret)
			bus_devfreq = devfreq_add_device(device->busmondev,
			&pwrscale->bus_profile.profile, "gpubw_mon", NULL);
		if (!IS_ERR(bus_devfreq))
				&pwrscale->bus_profile.profile, "gpubw_mon",
				NULL);

		if (IS_ERR_OR_NULL(bus_devfreq))
			dev_err(device->dev, "Bus scaling not enabled\n");
		else
			pwrscale->gpu_profile.bus_devfreq = bus_devfreq;
	}