From e5a4867edf18987eaff0f739e9aa5d456e1f2ec4 Mon Sep 17 00:00:00 2001 From: Guochun Huang Date: Mon, 14 Jul 2025 10:05:56 +0800 Subject: [PATCH] misc: rk628: Fix compilation errors on 32-bit soc platforms. Change-Id: I961b2f33ef3707795eddd701ec8765dbe0a0c4f7 Signed-off-by: Guochun Huang --- drivers/misc/rk628/rk628.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/rk628/rk628.c b/drivers/misc/rk628/rk628.c index 102e8b12ff83..fec76332c297 100644 --- a/drivers/misc/rk628/rk628.c +++ b/drivers/misc/rk628/rk628.c @@ -994,7 +994,7 @@ static void rk628_show_resolution(struct seq_file *s) src_vtotal = src_mode->vtotal; /* get fps */ - fps = src_dclk * 1000 / (src_htotal * src_vtotal); + fps = DIV_ROUND_CLOSEST_ULL(src_dclk * 1000, src_htotal * src_vtotal); clk_rx_read = rk628_cru_clk_get_rate(rk628, CGU_CLK_RX_READ) / 1000; @@ -1058,7 +1058,7 @@ static void rk628f_show_rgbrx_resolution(struct seq_file *s) src_vtotal = val & 0xffff; /* get fps */ - fps = src_dclk * 1000 / (src_htotal * src_vtotal); + fps = DIV_ROUND_CLOSEST_ULL(src_dclk * 1000, src_htotal * src_vtotal); clk_rx_read = rk628_cru_clk_get_rate(rk628, CGU_CLK_RX_READ) / 1000; @@ -1117,7 +1117,7 @@ static void rk628_show_output_resolution(struct seq_file *s) dsp_vact_end = val & 0xfff; /* get fps */ - fps = sclk_vop * 1000 / (dsp_vtotal * dsp_htotal); + fps = DIV_ROUND_CLOSEST_ULL(sclk_vop * 1000, (dsp_vtotal * dsp_htotal)); bus_format_s = rk628_get_output_bus_format_name(rk628);