mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: iris: Fix FPS calculation and VPP FW overhead
@ 2026-06-02 21:01 Bryan O'Donoghue
  2026-06-03  9:00 ` Vikash Garodia
  2026-06-03 13:21 ` Dmitry Baryshkov
  0 siblings, 2 replies; 3+ messages in thread
From: Bryan O'Donoghue @ 2026-06-02 21:01 UTC (permalink / raw)
  To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Mauro Carvalho Chehab, Vishnu Reddy
  Cc: linux-media, linux-arm-msm, linux-kernel, kernel test robot,
	Bryan O'Donoghue

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>
---
Quick fix for u32 bit division error in -next.
---
 drivers/media/platform/qcom/iris/iris_vpu_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/media/platform/qcom/iris/iris_vpu_common.c
index 5a85568c5ee1c..37dbfe433a085 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
@@ -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);

---
base-commit: 6a75e3d4f6428b90f398354212e3a2e0172851d6
change-id: 20260602-fixbranch-b5e1adc00e92

Best regards,
--  
Bryan O'Donoghue <bod@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-03 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-02 21:01 [PATCH] media: iris: Fix FPS calculation and VPP FW overhead Bryan O'Donoghue
2026-06-03  9:00 ` Vikash Garodia
2026-06-03 13:21 ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®