diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index cc61513afdb4e1c5a8b256abb7c70dd4a9124526..ddce8fcfc5c1dcebfb4d144476ce5cb9ef732160 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -2326,6 +2326,21 @@ static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk, error = (error || in_width > maxsinglelinewidth * 2 || (in_width > maxsinglelinewidth && *five_taps) || !*core_clk || *core_clk > dispc_core_clk_rate()); + + if (!error) { + /* verify that we're inside the limits of scaler */ + if (in_width / 4 > out_width) + error = 1; + + if (*five_taps) { + if (in_height / 4 > out_height) + error = 1; + } else { + if (in_height / 2 > out_height) + error = 1; + } + } + if (error) { if (*decim_x == *decim_y) { *decim_x = min_factor;