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

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

Merge "devfreq: bwmon: Increase the IOPercentage limits to 400"

parents f7187643 70c09f9c
Loading
Loading
Loading
Loading
+15 −3
Original line number Original line Diff line number Diff line
@@ -1147,14 +1147,16 @@ static ssize_t polling_interval_store(struct device *dev,
	unsigned int value;
	unsigned int value;
	int ret;
	int ret;


	if (!df->governor)
		return -EINVAL;

	ret = sscanf(buf, "%u", &value);
	ret = sscanf(buf, "%u", &value);
	if (ret != 1)
	if (ret != 1)
		return -EINVAL;
		return -EINVAL;


	mutex_lock(&df->event_lock);
	mutex_lock(&df->event_lock);
	if (!df->governor || df->dev_suspended) {
		dev_warn(dev, "device suspended, operation not allowed\n");
		mutex_unlock(&df->event_lock);
		return -EINVAL;
	}
	df->governor->event_handler(df, DEVFREQ_GOV_INTERVAL, &value);
	df->governor->event_handler(df, DEVFREQ_GOV_INTERVAL, &value);
	ret = count;
	ret = count;
	mutex_unlock(&df->event_lock);
	mutex_unlock(&df->event_lock);
@@ -1176,6 +1178,11 @@ static ssize_t min_freq_store(struct device *dev, struct device_attribute *attr,
		return -EINVAL;
		return -EINVAL;


	mutex_lock(&df->event_lock);
	mutex_lock(&df->event_lock);
	if (df->dev_suspended) {
		dev_warn(dev, "device suspended, min freq not allowed\n");
		mutex_unlock(&df->event_lock);
		return -EINVAL;
	}
	mutex_lock(&df->lock);
	mutex_lock(&df->lock);
	max = df->max_freq;
	max = df->max_freq;
	if (value && max && value > max) {
	if (value && max && value > max) {
@@ -1213,6 +1220,11 @@ static ssize_t max_freq_store(struct device *dev, struct device_attribute *attr,
		return -EINVAL;
		return -EINVAL;


	mutex_lock(&df->event_lock);
	mutex_lock(&df->event_lock);
	if (df->dev_suspended) {
		mutex_unlock(&df->event_lock);
		dev_warn(dev, "device suspended, max freq not allowed\n");
		return -EINVAL;
	}
	mutex_lock(&df->lock);
	mutex_lock(&df->lock);
	min = df->min_freq;
	min = df->min_freq;
	if (value && min && value < min) {
	if (value && min && value < min) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -758,7 +758,7 @@ static DEVICE_ATTR_RW(throttle_adj);


gov_attr(guard_band_mbps, 0U, 2000U);
gov_attr(guard_band_mbps, 0U, 2000U);
gov_attr(decay_rate, 0U, 100U);
gov_attr(decay_rate, 0U, 100U);
gov_attr(io_percent, 1U, 100U);
gov_attr(io_percent, 1U, 400U);
gov_attr(bw_step, 50U, 1000U);
gov_attr(bw_step, 50U, 1000U);
gov_attr(sample_ms, 1U, 50U);
gov_attr(sample_ms, 1U, 50U);
gov_attr(up_scale, 0U, 500U);
gov_attr(up_scale, 0U, 500U);