]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: qcom: iris: Fix FPS calculation and VPP FW overhead
authorBryan O'Donoghue <bod@kernel.org>
Tue, 2 Jun 2026 21:01:24 +0000 (22:01 +0100)
committerBryan O'Donoghue <bod@kernel.org>
Tue, 2 Jun 2026 21:12:04 +0000 (22:12 +0100)
Use div_u64() instead of mult_fract as u64 operator division fails on 32 bit
systems which don't link against libgcc.

Fixes: 5c66647a5c3e ("media: iris: add FPS calculation and VPP FW overhead in frequency formula")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606030132.qnBXVDkM-lkp@intel.com/
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
drivers/media/platform/qcom/iris/iris_vpu_common.c

index 5a85568c5ee1c5b656131607e7aef1b8a75e020d..37dbfe433a085de0fade1794e026468291757605 100644 (file)
@@ -444,7 +444,7 @@ u64 iris_vpu3x_vpu4x_calculate_frequency(struct iris_inst *inst, size_t data_siz
 
        /* 1.05 is VPP FW overhead */
        if (inst->fw_caps[STAGE].value == STAGE_2)
-               vpp_cycles += mult_frac(vpp_cycles, 5, 100);
+               vpp_cycles += div_u64(vpp_cycles * 5, 100);
 
        vsp_cycles = fps * data_size * 8;
        vsp_cycles = div_u64(vsp_cycles, 2);