diff options
author | mark gutman <r58412@freescale.com> | 2009-11-29 16:31:50 +0200 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-02-12 17:19:40 +0100 |
commit | 8dec57adb80538be9aa2864ffc93d5b6db728596 (patch) | |
tree | bbb1edade7eb2ec3059d808d423266b71c3b067a /drivers/media/video | |
parent | da64d2610faa682b4a04958a939bda6d28828acc (diff) |
ENGR00118832 TVout: error color displays
Fixing IC bypass behavoir for cropping
Signed-off-by: Mark Gutman <r58412@freescale.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/mxc/output/mxc_v4l2_output.c | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/drivers/media/video/mxc/output/mxc_v4l2_output.c b/drivers/media/video/mxc/output/mxc_v4l2_output.c index 346348e285c1..f0d03dd987d0 100644 --- a/drivers/media/video/mxc/output/mxc_v4l2_output.c +++ b/drivers/media/video/mxc/output/mxc_v4l2_output.c @@ -1273,8 +1273,31 @@ static int mxc_v4l2out_streamon(vout_data * vout) * Meanwhile, apply IC bypass to SDC only */ vout->pp_split = 0;/* no pp_split by default */ + fbvar = fbi->var; + vout->xres = fbvar.xres; + vout->yres = fbvar.yres; + + if (vout->cur_disp_output == 3 || vout->cur_disp_output == 5) { + fbvar.bits_per_pixel = 16; + if (format_is_yuv(vout->v2f.fmt.pix.pixelformat)) + fbvar.nonstd = IPU_PIX_FMT_UYVY; + else + fbvar.nonstd = 0; + if (vout->cur_disp_output == 3) { + fbvar.xres = out_width; + fbvar.yres = out_height; + vout->xres = fbvar.xres; + vout->yres = fbvar.yres; + } + + fbvar.xres_virtual = out_width; + fbvar.yres_virtual = out_height * 2; + } + if (out_width == vout->v2f.fmt.pix.width && out_height == vout->v2f.fmt.pix.height && + vout->xres == out_width && + vout->yres == out_height && ipu_can_rotate_in_place(vout->rotate)) { vout->ic_bypass = 1; ipu_disable_irq(IPU_IRQ_PP_IN_EOF); @@ -1299,8 +1322,6 @@ static int mxc_v4l2out_streamon(vout_data * vout) if (vout->ic_bypass) pr_debug("Bypassing IC\n"); - fbvar = fbi->var; - if (fbi->fbops->fb_ioctl) { old_fs = get_fs(); set_fs(KERNEL_DS); @@ -1316,25 +1337,6 @@ static int mxc_v4l2out_streamon(vout_data * vout) } vout->display_ch = ipu_ch; - vout->xres = fbvar.xres; - vout->yres = fbvar.yres; - - if (vout->cur_disp_output == 3 || vout->cur_disp_output == 5) { - fbvar.bits_per_pixel = 16; - if (format_is_yuv(vout->v2f.fmt.pix.pixelformat)) - fbvar.nonstd = IPU_PIX_FMT_UYVY; - else - fbvar.nonstd = 0; - if (vout->cur_disp_output == 3) { - fbvar.xres = out_width; - fbvar.yres = out_height; - vout->xres = fbvar.xres; - vout->yres = fbvar.yres; - } - - fbvar.xres_virtual = out_width; - fbvar.yres_virtual = out_height * 2; - } if (vout->ic_bypass) { fbvar.bits_per_pixel = 8* |