diff options
| author | Ricardo Ribalda <ribalda@chromium.org> | 2025-12-23 10:02:58 +0000 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-01-20 14:00:12 +0100 |
| commit | 71fe80364a6584f404556ac9a6a4aca4ab80fb5b (patch) | |
| tree | 52f78dda20217958a5d66e06714a5c29a34ebfd9 /tools/lib/python/kdoc/parse_data_structs.py | |
| parent | 89f7cf35901138d9828d981ce64c131a3da6e867 (diff) | |
| download | linux-71fe80364a6584f404556ac9a6a4aca4ab80fb5b.tar.gz linux-71fe80364a6584f404556ac9a6a4aca4ab80fb5b.zip | |
media: iris: Fix fps calculation
iris_venc_s_param() uses do_div to divide two 64 bits operators, this is
wrong. Luckily for us, both of the operators fit in 32 bits, so we can use
a normal division.
Now that we are at it, mark the fps smaller than 1 as invalid, the code
does not seem to handle them properly.
The following cocci warning is fixed with this patch:
./platform/qcom/iris/iris_venc.c:378:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead
Fixes: 4ff586ff28e3 ("media: iris: Add support for G/S_PARM for encoder video device")
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions
