Commit f8a310e1 authored by Imre Deak's avatar Imre Deak Committed by Juha Yrjola

ARM: OMAP: DISPC scale down in one direction

- Fix the DISPC setup when scaling down only in one direction.
- Check the plane setup IOCTL parameters.
Signed-off-by: default avatarImre Deak <imre.deak@solidboot.com>
Signed-off-by: default avatarJuha Yrjola <juha.yrjola@solidboot.com>
parent 8540e3ce
......@@ -394,10 +394,10 @@ static inline int _setup_plane(int plane, int channel_out,
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);
}
......
......@@ -692,8 +692,13 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
{
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment