mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
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: Qiwei Liu <qiweil@codeaurora.org>
This commit is contained in:
parent
b098e7cf4e
commit
37de0e68d4
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue