diff options
author | Robby Cai <R63905@freescale.com> | 2010-03-17 19:32:11 +0800 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-25 11:17:22 +0200 |
commit | 2ce0d1c2fe1132724717d539a768d262818c9a3b (patch) | |
tree | bdbdbdb12f5439865596fcd16461996233de6a55 /drivers/media | |
parent | 951464a822bc4b78d55016187ce416f8ad7ec462 (diff) |
ENGR00119644-1 [MXS] PXP/v4l: 90/270 degree rotation output is not correct.
correct the setting of HW_PXP_OLnSIZE and HW_PXP_RGBSIZE(or HW_PXP_OUTSIZE)
Signed-off-by: Robby Cai <R63905@freescale.com>
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/mxs_pxp.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/media/video/mxs_pxp.c b/drivers/media/video/mxs_pxp.c index 0fa1b56521d9..189dbebc85ae 100644 --- a/drivers/media/video/mxs_pxp.c +++ b/drivers/media/video/mxs_pxp.c @@ -194,8 +194,14 @@ static void pxp_set_rgbbuf(struct pxps *pxp) { pxp->regs_virt->rgbbuf = pxp->outb_phys; /* Always equal to the FB size */ - pxp->regs_virt->rgbsize = BF_PXP_OUTSIZE_WIDTH(pxp->fb.fmt.width) | - BF_PXP_OUTSIZE_HEIGHT(pxp->fb.fmt.height); + if (pxp->rotate % 180) + pxp->regs_virt->rgbsize = + BF_PXP_OUTSIZE_WIDTH(pxp->fb.fmt.height) | + BF_PXP_OUTSIZE_HEIGHT(pxp->fb.fmt.width); + else + pxp->regs_virt->rgbsize = + BF_PXP_OUTSIZE_WIDTH(pxp->fb.fmt.width) | + BF_PXP_OUTSIZE_HEIGHT(pxp->fb.fmt.height); } static void pxp_set_s0colorkey(struct pxps *pxp) @@ -227,9 +233,14 @@ static void pxp_set_s1colorkey(struct pxps *pxp) static void pxp_set_oln(struct pxps *pxp) { pxp->regs_virt->ol0.ol = (u32) pxp->fb.base; - pxp->regs_virt->ol0.olsize = - BF_PXP_OLnSIZE_WIDTH(pxp->fb.fmt.width >> 3) | - BF_PXP_OLnSIZE_HEIGHT(pxp->fb.fmt.height >> 3); + if (pxp->rotate % 180) + pxp->regs_virt->ol0.olsize = + BF_PXP_OLnSIZE_WIDTH(pxp->fb.fmt.height >> 3) | + BF_PXP_OLnSIZE_HEIGHT(pxp->fb.fmt.width >> 3); + else + pxp->regs_virt->ol0.olsize = + BF_PXP_OLnSIZE_WIDTH(pxp->fb.fmt.width >> 3) | + BF_PXP_OLnSIZE_HEIGHT(pxp->fb.fmt.height >> 3); } static void pxp_set_olparam(struct pxps *pxp) @@ -292,6 +303,7 @@ static int pxp_set_scaling(struct pxps *pxp) if ((pxp->srect.width == pxp->drect.width) && (pxp->srect.height == pxp->drect.height)) { + pxp->regs_virt->s0scale = 0x10001000; pxp->scaling = 0; goto out; } @@ -653,6 +665,7 @@ static int pxp_streamon(struct file *file, void *priv, enum v4l2_buf_type t) if ((t != V4L2_BUF_TYPE_VIDEO_OUTPUT)) return -EINVAL; + pxp_set_rgbbuf(pxp); ret = videobuf_streamon(&pxp->s0_vbq); if (!ret && (pxp->output == 0)) |