diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c index 4d42da7255f3..e4cdd8b5745d 100644 --- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c +++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -291,7 +292,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 = div_u64(bt->pixelclock + (htotal * vtotal) / 2, htotal * vtotal); bt->width = hact; bt->height = vact; bt->hfrontporch = hfp;