aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/mxc/output/mxc_v4l2_output.c
diff options
context:
space:
mode:
authormark gutman <r58412@freescale.com>2009-11-29 16:31:50 +0200
committermark gutman <r58412@freescale.com>2009-12-01 14:05:08 +0200
commit4f67dbdc431d249c2fd873cdd32c8623fccbbf7c (patch)
treebbb1edade7eb2ec3059d808d423266b71c3b067a /drivers/media/video/mxc/output/mxc_v4l2_output.c
parent80c83d4f929e4b6a169b6ebdc7011636b67b311d (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/mxc/output/mxc_v4l2_output.c')
-rw-r--r--drivers/media/video/mxc/output/mxc_v4l2_output.c44
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 346348e285c..f0d03dd987d 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*