Skip to content

Commit b4bc703

Browse files
committed
phy: rockchip-inno-hdmi-phy: TMDS calculation overflow
For example 3840x2160p60 (Pixel Clk: 594000000Hz) -> bus_width==5 (YUV420 10bit) -> TMDS Clk: 371250000 (and should not overflow) !
1 parent 732b356 commit b4bc703

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/phy/rockchip/phy-rockchip-inno-hdmi-phy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,16 +411,16 @@ static u32 inno_hdmi_phy_get_tmdsclk(struct inno_hdmi_phy *inno, int rate)
411411
tmdsclk = rate / 2;
412412
break;
413413
case 5:
414-
tmdsclk = rate * 5 / 8;
414+
tmdsclk = (uint64_t)rate * 5 / 8;
415415
break;
416416
case 6:
417-
tmdsclk = rate * 3 / 4;
417+
tmdsclk = (uint64_t)rate * 3 / 4;
418418
break;
419419
case 10:
420-
tmdsclk = rate * 5 / 4;
420+
tmdsclk = (uint64_t)rate * 5 / 4;
421421
break;
422422
case 12:
423-
tmdsclk = rate * 3 / 2;
423+
tmdsclk = (uint64_t)rate * 3 / 2;
424424
break;
425425
case 16:
426426
tmdsclk = rate * 2;

0 commit comments

Comments
 (0)