diff options
| -rw-r--r-- | drivers/video/fbdev/omap2/dss/dispc.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 646d94a71a79..f8c9115cdb4b 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c | |||
| @@ -2418,6 +2418,9 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, | |||
| 2418 | return 0; | 2418 | return 0; |
| 2419 | } | 2419 | } |
| 2420 | 2420 | ||
| 2421 | #define DIV_FRAC(dividend, divisor) \ | ||
| 2422 | ((dividend) * 100 / (divisor) - ((dividend) / (divisor) * 100)) | ||
| 2423 | |||
| 2421 | static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, | 2424 | static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, |
| 2422 | enum omap_overlay_caps caps, | 2425 | enum omap_overlay_caps caps, |
| 2423 | const struct omap_video_timings *mgr_timings, | 2426 | const struct omap_video_timings *mgr_timings, |
| @@ -2477,8 +2480,19 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, | |||
| 2477 | if (ret) | 2480 | if (ret) |
| 2478 | return ret; | 2481 | return ret; |
| 2479 | 2482 | ||
| 2480 | DSSDBG("required core clk rate = %lu Hz\n", core_clk); | 2483 | DSSDBG("%dx%d -> %dx%d (%d.%02d x %d.%02d), decim %dx%d %dx%d (%d.%02d x %d.%02d), taps %d, req clk %lu, cur clk %lu\n", |
| 2481 | DSSDBG("current core clk rate = %lu Hz\n", dispc_core_clk_rate()); | 2484 | width, height, |
| 2485 | out_width, out_height, | ||
| 2486 | out_width / width, DIV_FRAC(out_width, width), | ||
| 2487 | out_height / height, DIV_FRAC(out_height, height), | ||
| 2488 | |||
| 2489 | decim_x, decim_y, | ||
| 2490 | width / decim_x, height / decim_y, | ||
| 2491 | out_width / (width / decim_x), DIV_FRAC(out_width, width / decim_x), | ||
| 2492 | out_height / (height / decim_y), DIV_FRAC(out_height, height / decim_y), | ||
| 2493 | |||
| 2494 | *five_taps ? 5 : 3, | ||
| 2495 | core_clk, dispc_core_clk_rate()); | ||
| 2482 | 2496 | ||
| 2483 | if (!core_clk || core_clk > dispc_core_clk_rate()) { | 2497 | if (!core_clk || core_clk > dispc_core_clk_rate()) { |
| 2484 | DSSERR("failed to set up scaling, " | 2498 | DSSERR("failed to set up scaling, " |
