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

Commit 3418f42b authored by Manikanta Kanamarlapudi's avatar Manikanta Kanamarlapudi Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Update device clock after cx ipeak logic



Existing code updates the device clock before cx ipeak logic.
As a result, the cx ipeak takes a decision based on updated
clock rather than the clock at which the device was running.
With the change, device clock is updated after the cx ipeak
is decided.

Change-Id: Icfde29176f8adb3a12c68a611f47b83ca7a8e4a9
Signed-off-by: default avatarVikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: default avatarManikanta Kanamarlapudi <kmanikan@codeaurora.org>
parent 3c753584
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1292,13 +1292,12 @@ static int __set_clk_rate(struct venus_hfi_device *device,
		return rc;
	}

	device->clk_freq = rate;

	if (device->clk_freq >= threshold_freq && rate < threshold_freq) {
	if (ipeak && device->clk_freq >= threshold_freq && rate < threshold_freq) {
		rc = cx_ipeak_update(ipeak, false);
		if (rc) {
			dprintk(VIDC_ERR,
				"cx_ipeak_update failed! ipeak %pK\n", ipeak);
			device->clk_freq = rate;
			return rc;
		}
		dprintk(VIDC_PERF,
@@ -1306,6 +1305,8 @@ static int __set_clk_rate(struct venus_hfi_device *device,
				device->clk_freq, rate, threshold_freq);
	}

	device->clk_freq = rate;

	return rc;
}