Skip to content

Commit

Permalink
OMAPDSS: HDMI: make hdmi pclk check more permissive
Browse files Browse the repository at this point in the history
The hdmi driver tries to find the given video timings from its static
list of timings, to find the required ID for the mode. The check tries
to find exact match for the pixel clock, among other checks.

with omapfb driver there can be some amount of error in the give pixel
clock, as the pixel clock is converted between Hz and ps, thus the
hdmi's check fails to find the mode.

This patch makes the check more allowing, by rounding the pixel clocks
to nearest MHz.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Ricardo Neri <ricardo.neri@ti.com>
  • Loading branch information
Tomi Valkeinen committed Oct 29, 2012
1 parent 7a7ce2c commit f236b89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/video/omap2/dss/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ static bool hdmi_timings_compare(struct omap_video_timings *timing1,
{
int timing1_vsync, timing1_hsync, timing2_vsync, timing2_hsync;

if ((timing2->pixel_clock == timing1->pixel_clock) &&
if ((DIV_ROUND_CLOSEST(timing2->pixel_clock, 1000) ==
DIV_ROUND_CLOSEST(timing1->pixel_clock, 1000)) &&
(timing2->x_res == timing1->x_res) &&
(timing2->y_res == timing1->y_res)) {

Expand Down

0 comments on commit f236b89

Please sign in to comment.