[PATCH v1] media: platform: synopsys: hdmirx: Fix compilation on 32bit arches

Hans Verkuil hverkuil at xs4all.nl
Fri Mar 7 01:54:58 PST 2025


Hi Dmitry,

On 07/03/2025 10:21, Dmitry Osipenko wrote:
> The pixelclock is specified as 64bit integer and for this driver it
> won't be above 600MHz. Fix the 64bit division of the pixclock for 32bit
> kernel builds.
> 
> Reported-by: kernel test robot <lkp at intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202503070743.WnRxStlk-lkp@intel.com/
> Signed-off-by: Dmitry Osipenko <dmitry.osipenko at collabora.com>
> ---
>  drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
> index 4d42da7255f3..7e342bbde967 100644
> --- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
> +++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
> @@ -291,7 +291,7 @@ static void hdmirx_get_timings(struct snps_hdmirx_dev *hdmirx_dev,
>  	hfp = htotal - hact - hs - hbp;
>  	vfp = vtotal - vact - vs - vbp;
>  
> -	fps = (bt->pixelclock + (htotal * vtotal) / 2) / (htotal * vtotal);
> +	fps = ((u32)bt->pixelclock + (htotal * vtotal) / 2) / (htotal * vtotal);

I just merged:

https://patchwork.linuxtv.org/project/linux-media/patch/20250306-synopsys-hdmirx-fix-64-div-v1-1-dd5ff38bba5e@kernel.org/

So you can either leave that patch in, or provide a patch on top.

Regards,

	Hans

>  	bt->width = hact;
>  	bt->height = vact;
>  	bt->hfrontporch = hfp;




More information about the Linux-rockchip mailing list