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

Commit 37de0e68 authored by Qiwei Liu's avatar Qiwei Liu
Browse files

msm: vidc: avoid repeatedly set the same freq



If requested clk_freq is not changed, don't call
clk driver to the same value repeatedly.

Change-Id: I7ff1d7faedb10b06c0371f66b4a6cf6592d165fe
Signed-off-by: default avatarQiwei Liu <qiweil@codeaurora.org>
parent b098e7cf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1326,6 +1326,10 @@ static int __set_clocks(struct venus_hfi_device *device, u32 freq)
	struct clock_info *cl;
	int rc = 0;

	/* bail early if requested clk_freq is not changed */
	if (freq == device->clk_freq)
		return 0;

	venus_hfi_for_each_clock(device, cl) {
		if (cl->has_scaling) {/* has_scaling */
			rc = __set_clk_rate(device, cl, freq);