summaryrefslogtreecommitdiff
path: root/drivers/video/mxc/mxc_ipuv3_fb.c
diff options
context:
space:
mode:
authorJason Chen <b02280@freescale.com>2011-11-14 10:34:49 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:17:44 +0800
commit25e10f4261c1569e005d234e2d0a4d0080b271af (patch)
tree08d7825f1a634966118034eeff14756cb526086b /drivers/video/mxc/mxc_ipuv3_fb.c
parent7405187ac72e41f4b3950ebe338b6b717cee886f (diff)
ENGR00161948 mxc v4l2 output: fix case of input crop with xoffset
run test like: /unit_tests//mxc_v4l2_output.out -iw 1280 -ih 720 -cr 1024 700 40 0 -ow 1024 -oh 700 /unit_tests/720p.yuv Under IPU IC bypass mode, the output color is not correct. And sometimes come out tearing issue. Fix them by modify fb driver adding xpanstep support and set vb->state to DONE after it finish show. When previous videobuf finish show and next videobuf ready to show, set VIDEOBUF_DONE state to avoid tearing issue, which make sure showing buffer will not be dequeue to write new data. It also bring side-effect that the last buffer can not be dequeue correctly, app need take care about it. Signed-off-by: Jason Chen <b02280@freescale.com>
Diffstat (limited to 'drivers/video/mxc/mxc_ipuv3_fb.c')
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index 74e4077600b7..e7ad13727de5 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -170,7 +170,7 @@ static int mxcfb_set_fix(struct fb_info *info)
fix->type = FB_TYPE_PACKED_PIXELS;
fix->accel = FB_ACCEL_NONE;
fix->visual = FB_VISUAL_TRUECOLOR;
- fix->xpanstep = 0;
+ fix->xpanstep = 1;
fix->ywrapstep = 1;
fix->ypanstep = 1;
@@ -1234,16 +1234,15 @@ mxcfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
}
/* update u/v offset */
- if (info->var.xres_virtual > info->var.xres)
- ipu_update_channel_offset(mxc_fbi->ipu, mxc_fbi->ipu_ch,
- IPU_INPUT_BUFFER,
- bpp_to_pixfmt(info),
- info->var.xres_virtual,
- info->var.yres_virtual,
- info->var.xres_virtual,
- 0, 0,
- var->yoffset,
- var->xoffset);
+ ipu_update_channel_offset(mxc_fbi->ipu, mxc_fbi->ipu_ch,
+ IPU_INPUT_BUFFER,
+ bpp_to_pixfmt(info),
+ info->var.xres_virtual,
+ info->var.yres_virtual,
+ info->var.xres_virtual,
+ 0, 0,
+ var->yoffset,
+ var->xoffset);
ipu_select_buffer(mxc_fbi->ipu, mxc_fbi->ipu_ch, IPU_INPUT_BUFFER,
mxc_fbi->cur_ipu_buf);