Skip to content

Commit

Permalink
OMAPDSS: DPI: Fix wrong pixel clock limit
Browse files Browse the repository at this point in the history
DPI is supposed to skip odd dividers in the clock path when the pixel
clock is higher than 100MHz. The code, however, defines the pixel clock
limit as 1MHz. This causes the driver to skip valid clock dividers,
possibly making the pixel clock to be further away from the requested
one than necessary.

Fix the clock limit to 100MHz.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: NeilBrown <neilb@suse.de>
  • Loading branch information
Tomi Valkeinen committed Jun 26, 2013
1 parent f5725af commit 72e5512
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static bool dpi_calc_dispc_cb(int lckd, int pckd, unsigned long lck,
* shifted. So skip all odd dividers when the pixel clock is on the
* higher side.
*/
if (ctx->pck_min >= 1000000) {
if (ctx->pck_min >= 100000000) {
if (lckd > 1 && lckd % 2 != 0)
return false;

Expand All @@ -156,7 +156,7 @@ static bool dpi_calc_hsdiv_cb(int regm_dispc, unsigned long dispc,
* shifted. So skip all odd dividers when the pixel clock is on the
* higher side.
*/
if (regm_dispc > 1 && regm_dispc % 2 != 0 && ctx->pck_min >= 1000000)
if (regm_dispc > 1 && regm_dispc % 2 != 0 && ctx->pck_min >= 100000000)
return false;

ctx->dsi_cinfo.regm_dispc = regm_dispc;
Expand Down

0 comments on commit 72e5512

Please sign in to comment.