]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: venus: fix hw overload error log condition
authorMansur Alisha Shaik <mansur@codeaurora.org>
Thu, 8 Apr 2021 13:35:00 +0000 (15:35 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 15 Apr 2021 11:13:05 +0000 (13:13 +0200)
In current video driver, frequency is calculated for all the
running video instances and check aganist maximum supported frequency.
If both calculated frequency and maximum supported frequency are same,
even then HW overload error is printed.
Fix this by printing error log only when frequency is greater than
maximum supported frequency.

Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/venus/pm_helpers.c

index 5c0a9aa23e8335997fb3f51e8f0816fad50d0411..abb4b69783b23e87f6f45ed22a3d64bf78438e4c 100644 (file)
@@ -1083,7 +1083,7 @@ static int load_scale_v4(struct venus_inst *inst)
 
        freq = max(freq_core1, freq_core2);
 
-       if (freq >= table[0].freq) {
+       if (freq > table[0].freq) {
                freq = table[0].freq;
                dev_warn(dev, "HW is overloaded, needed: %lu max: %lu\n",
                         freq, table[0].freq);