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

Commit 67b818fc authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu Committed by Gerrit - the friendly Code Review server
Browse files

devfreq: update target frequency in cdspl3 governor start



Trigger an update devfreq to reflect the desired target frequency
when cdspl3 governor is selected for a device. This is to avoid
running with a target frequency set by a different governor before
 cdspl3 governor gets L3 frequency request from CDSP.

Change-Id: Id5bf006d9d0584c7df93b01e47f4ccc5167fe8aa
Acked-by: default avatarSreekanth Gande <sgande@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent a7d847f5
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -54,18 +54,28 @@ static int devfreq_get_target_freq(struct devfreq *df,

static int gov_start(struct devfreq *df)
{
	int ret = 0;

	if (p_me.of_node != df->dev.parent->of_node) {
		dev_err(df->dev.parent,
		"Device match error in CDSP L3 frequency governor\n");
		return -ENODEV;
	}

	p_me.df = df;
	p_me.l3_freq_hz = 0;
	/*
	 * Trigger an update to set the target frequency
	 */
	mutex_lock(&df->lock);
	ret = update_devfreq(df);
	mutex_unlock(&df->lock);
	/*
	 * Send governor start message to CDSP RM driver
	 */
	cdsprm_register_cdspl3gov(&cdsprm);
	return 0;

	return ret;
}

static int gov_stop(struct devfreq *df)