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

Commit a9c50a83 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Add opp table to bus monitor device"

parents 6b479351 8103896c
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;
	}