diff options
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index bab9d6b95c32..36ecb91b2452 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -2264,14 +2264,16 @@ static int dispc_ovl_calc_scaling_44xx(enum omap_plane plane, | |||
2264 | u16 in_height = DIV_ROUND_UP(height, *decim_y); | 2264 | u16 in_height = DIV_ROUND_UP(height, *decim_y); |
2265 | const int maxsinglelinewidth = | 2265 | const int maxsinglelinewidth = |
2266 | dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH); | 2266 | dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH); |
2267 | unsigned long pclk = dispc_plane_pclk_rate(plane); | ||
2268 | const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE); | 2267 | const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE); |
2269 | 2268 | ||
2270 | if (mem_to_mem) | 2269 | if (mem_to_mem) { |
2271 | in_width_max = DIV_ROUND_UP(out_width, maxdownscale); | 2270 | in_width_max = out_width * maxdownscale; |
2272 | else | 2271 | } else { |
2272 | unsigned long pclk = dispc_plane_pclk_rate(plane); | ||
2273 | |||
2273 | in_width_max = dispc_core_clk_rate() / | 2274 | in_width_max = dispc_core_clk_rate() / |
2274 | DIV_ROUND_UP(pclk, out_width); | 2275 | DIV_ROUND_UP(pclk, out_width); |
2276 | } | ||
2275 | 2277 | ||
2276 | *decim_x = DIV_ROUND_UP(width, in_width_max); | 2278 | *decim_x = DIV_ROUND_UP(width, in_width_max); |
2277 | 2279 | ||