- Fix the DISPC setup when scaling down only in one direction.
- Check the plane setup IOCTL parameters.
Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
if (set_vsize) {
/* Set video size if set_scale hasn't set it */
- if (!dispc.fir_hinc[plane])
+ if (!dispc.fir_vinc[plane])
MOD_REG_FLD(vs_reg[plane],
FLD_MASK(16, 11), (height - 1) << 16);
- if (!dispc.fir_vinc[plane])
+ if (!dispc.fir_hinc[plane])
MOD_REG_FLD(vs_reg[plane],
FLD_MASK(0, 11), width - 1);
}
{
struct omapfb_plane_struct *plane = fbi->par;
struct omapfb_device *fbdev = plane->fbdev;
+ struct lcd_panel *panel = fbdev->panel;
int r;
+ if (pi->pos_x + pi->out_width > panel->x_res ||
+ pi->pos_y + pi->out_height > panel->y_res)
+ return -EINVAL;
+
plane->info = *pi;
r = ctrl_change_mode(fbi);
if (r < 0)