Skip to content

Commit

Permalink
phy: rockchip-inno-hdmi-phy: TMDS calculation overflow
Browse files Browse the repository at this point in the history
For example 3840x2160p60 (Pixel Clk: 594000000Hz) -> bus_width==5 (YUV420 10bit) -> TMDS Clk: 371250000 (and should not overflow) !
  • Loading branch information
mcerveny committed Jan 31, 2018
1 parent 732b356 commit b4bc703
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/phy/rockchip/phy-rockchip-inno-hdmi-phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,16 +411,16 @@ static u32 inno_hdmi_phy_get_tmdsclk(struct inno_hdmi_phy *inno, int rate)
tmdsclk = rate / 2;
break;
case 5:
tmdsclk = rate * 5 / 8;
tmdsclk = (uint64_t)rate * 5 / 8;
break;
case 6:
tmdsclk = rate * 3 / 4;
tmdsclk = (uint64_t)rate * 3 / 4;
break;
case 10:
tmdsclk = rate * 5 / 4;
tmdsclk = (uint64_t)rate * 5 / 4;
break;
case 12:
tmdsclk = rate * 3 / 2;
tmdsclk = (uint64_t)rate * 3 / 2;
break;
case 16:
tmdsclk = rate * 2;
Expand Down

0 comments on commit b4bc703

Please sign in to comment.