Re: [PATCH] media: iris: add FPS calculation and VPP FW overhead in frequency formula

From: Konrad Dybcio

Date: Wed Mar 04 2026 - 04:34:20 EST


On 3/4/26 10:18 AM, Vishnu Reddy wrote:
> The driver was using a fixed default FPS value when calculating the VPU
> frequency. This caused wrong frequency requests for high‑frame‑rate
> streams, for example 4K at 240 FPS. Because of this, the hardware was
> running at a lower frequency than needed.
>
> Add the FPS measurement based on the decoder input buffer arrival rate.
> The measured FPS is stored per instance and used in frequency calculation
> instead of the fixed default FPS. The value is clamped so that it does
> not exceed platform limits. Add a VPP firmware overhead when running in
> STAGE_2.
>
> Signed-off-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
> ---

[...]

> + /* 1.050 is VPP FW overhead */
> + if (inst->fw_caps[STAGE].value == STAGE_2)
> + vpp_cycles += div_u64(vpp_cycles * 50, 1000);

let's use mult_frac() and trim the trailing zero

Konrad