aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/mxc/mxc_ipuv3_fb.c
diff options
context:
space:
mode:
authorJason Chen <b02280@freescale.com>2011-11-04 16:42:40 +0800
committerEric Miao <eric.miao@canonical.com>2011-11-10 07:39:04 +0800
commitafcc1eb355bb50a76b08897deb5807cc490e16a5 (patch)
treec59ba1bff27336d7daf5ffeb57fb59e608502746 /drivers/video/mxc/mxc_ipuv3_fb.c
parente1d6d2ccd2aebda38ce5627d3179a670e204731f (diff)
ENGR00160878-2 mxc v4l2 output: new mxc v4l2 output driver based on videobuf
This new v4l2 output driver is based on videobuf, using dma contig alloc method. It creates video dev node for each display framebuffer begin from /dev/video16 by default. If need post-processing, this driver will do it by ipu pp driver which support: - resizing - CSC - rotate - deinterlacing If no need post-processing, the IPU IC will be bypassed as old driver, the buf will be set to fb buffer directly by crack fb smem_start. The user should do setting before streamon like below: 1. set output crop 2. set ctrl like rotate/vflip/hflip/deinterlacing motion 3. set fmt 4. reqbuf The new features compare to old driver: - support multi-instance - support user point buffer - runtime suspend/resume For suspend/resume, still has chance to meet issue on mx6q, will fix later. 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.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index d1252bae883..11e67449fea 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -244,8 +244,7 @@ static int _setup_disp_channel2(struct fb_info *fbi)
IPU_ROTATE_NONE,
base,
base,
- (fbi->var.accel_flags ==
- FB_ACCEL_TRIPLE_FLAG) ? base : 0,
+ base,
0, 0);
if (retval) {
dev_err(fbi->device,
@@ -577,8 +576,7 @@ static int mxcfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
if (var->xres_virtual < var->xres)
var->xres_virtual = var->xres;
- /* Default Y virtual size is 3*yres */
- if (var->yres_virtual < var->yres * 3)
+ if (var->yres_virtual < var->yres)
var->yres_virtual = var->yres * 3;
if ((var->bits_per_pixel != 32) && (var->bits_per_pixel != 24) &&
@@ -1235,6 +1233,17 @@ mxcfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
mxc_fbi->cur_ipu_alpha_buf);
}
+ /* update u/v offset */
+ 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);
ipu_clear_irq(mxc_fbi->ipu, mxc_fbi->ipu_ch_irq);