Skip to content

Commit

Permalink
OMAPDSS: DSI: Fix bug when calculating LP command interleaving parame…
Browse files Browse the repository at this point in the history
…ters

In function dsi_compute_interleave_lp(), the escape clock/LP clock time period
is calculated incorrectly. The escape clock/LP clock is calculated as:

LP Clock(Hz) = DSI_FCLK(Hz) / lp_clk_div

Since we are calculating the time period of LP clock, the LP clock divider
should be multiplied with the time period of DSI_FCLK.

Calculating incorrect value of txclkesc results in incorrect calculation of LP
interleaving parameters, it also creates a possibility of a divide by zero
error.

Reported-by: Sureshkumar Manimuthu <mail2msuresh@ti.com>

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Archit Taneja authored and Tomi Valkeinen committed Jun 4, 2012
1 parent 5025ce0 commit 2e063c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3724,7 +3724,7 @@ static int dsi_compute_interleave_lp(int blank, int enter_hs, int exit_hs,
/* CLKIN4DDR = 16 * TXBYTECLKHS */
tlp_avail = thsbyte_clk * (blank - trans_lp);

ttxclkesc = tdsi_fclk / lp_clk_div;
ttxclkesc = tdsi_fclk * lp_clk_div;

lp_inter = ((tlp_avail - 8 * thsbyte_clk - 5 * tdsi_fclk) / ttxclkesc -
26) / 16;
Expand Down

0 comments on commit 2e063c3

Please sign in to comment.