Re: OMAPDSS: DISPC: horizontal timing too tight errors

From: Pavel Machek
Date: Tue Jan 07 2014 - 16:28:09 EST


Hi!

> Ok, after looking at what both N900 and N9 Nokia kernels do, I came
> up with the patch bellow. If you are ok with the changes, I'll
> submit the patch as it should. With that patch I tried more than 20
> videos of different resolutions(including 720p), not a single
> failure :) . Basically it changes the core clock calculation to be
> done in the same way as in the Nokia kernels.

Thanks for the investigation.


> +again:
> + if(*five_taps)

>From a quick view, you may want to add space after if.

> + if(*five_taps && error) {
> + *five_taps = false;
> + goto again;
> + }

Here too.

> error = (error || in_width > maxsinglelinewidth * 2 ||
> (in_width > maxsinglelinewidth && *five_taps) ||
> @@ -2226,7 +2240,7 @@ static int
> dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk,
> } while (*decim_x <= *x_predecim && *decim_y <= *y_predecim && error);
>
> if (check_horiz_timing_omap3(pclk, lclk, mgr_timings, pos_x, width,
> - height, out_width, out_height)){
> + height, out_width, out_height, *five_taps)){

...and before {.

(calc_scaling... that function has 16 arguments. Whoever created
it should be shot... or sold to Microsoft ;-).

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/