summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFancy Fang <B47543@freescale.com>2013-11-29 18:37:45 +0800
committerFancy Fang <B47543@freescale.com>2013-11-29 19:07:52 +0800
commit23bf8b3e9650af832cbcf73f8d6e50c017476fb2 (patch)
tree8339496429401b7c238a8512174f7cdb6de41529
parentad64da1183025af28eb4e03981a81ebbc8087092 (diff)
ENGR00290236 PXP: Correct PXP settings when s0 format is PXP_PIX_FMT_YUV422P
When the s0 format is PXP_PIX_FMT_YUV422P, the s0 pitch and U/V buffer address cannot be set correctly. Signed-off-by: Fancy Fang <B47543@freescale.com> (cherry picked from commit eb887a646c992ee455edfc1fe482cfbced95b187)
-rw-r--r--drivers/dma/pxp/pxp_dma_v2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c
index 6ec441b97810..0cd8c71b08d6 100644
--- a/drivers/dma/pxp/pxp_dma_v2.c
+++ b/drivers/dma/pxp/pxp_dma_v2.c
@@ -902,9 +902,12 @@ static void pxp_set_s0buf(struct pxps *pxp)
__raw_writel(Y1, pxp->base + HW_PXP_PS_BUF);
if ((s0_params->pixel_fmt == PXP_PIX_FMT_YUV420P) ||
(s0_params->pixel_fmt == PXP_PIX_FMT_YVU420P) ||
- (s0_params->pixel_fmt == PXP_PIX_FMT_GREY)) {
+ (s0_params->pixel_fmt == PXP_PIX_FMT_GREY) ||
+ (s0_params->pixel_fmt == PXP_PIX_FMT_YUV422P)) {
/* Set to 1 if YUV format is 4:2:2 rather than 4:2:0 */
int s = 2;
+ if (s0_params->pixel_fmt == PXP_PIX_FMT_YUV422P)
+ s = 1;
offset = proc_data->srect.top * s0_params->width / 4 +
proc_data->srect.left / 2;
@@ -938,7 +941,8 @@ static void pxp_set_s0buf(struct pxps *pxp)
s0_params->pixel_fmt == PXP_PIX_FMT_NV12 ||
s0_params->pixel_fmt == PXP_PIX_FMT_NV21 ||
s0_params->pixel_fmt == PXP_PIX_FMT_NV16 ||
- s0_params->pixel_fmt == PXP_PIX_FMT_NV61) {
+ s0_params->pixel_fmt == PXP_PIX_FMT_NV61 ||
+ s0_params->pixel_fmt == PXP_PIX_FMT_YUV422P) {
__raw_writel(pitch, pxp->base + HW_PXP_PS_PITCH);
}
else if (s0_params->pixel_fmt == PXP_PIX_FMT_GY04)