summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2012-08-30 16:37:48 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2012-08-30 16:37:48 +0800
commita4d0bf3916d2f75a2977869e804d5f4fff4d1d3e (patch)
tree75c1f9f8074170da088e685b03bc40e0de67fe8b /drivers/dma
parent65745dd4b7f80711d03dce5529fc501162428c53 (diff)
parent4d38f38359c287d1000bbef7731a03e32b8d9ca2 (diff)
Merge remote branch 'fsl-linux-sdk/imx_3.0.35_12.09.01' into imx_3.0.35_android
Conflicts: arch/arm/mach-mx6/board-mx6q_sabresd.c arch/arm/mach-mx6/board-mx6sl_arm2.c arch/arm/mach-mx6/bus_freq.c arch/arm/mach-mx6/cpu_op-mx6.c arch/arm/plat-mxc/cpufreq.c
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pxp/pxp_dma_v2.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c
index ceb72edbd39e..87b8f558ae8c 100644
--- a/drivers/dma/pxp/pxp_dma_v2.c
+++ b/drivers/dma/pxp/pxp_dma_v2.c
@@ -339,7 +339,14 @@ static void pxp_set_outbuf(struct pxps *pxp)
BF_PXP_OUT_LRC_Y(out_params->height - 1),
pxp->base + HW_PXP_OUT_LRC);
- __raw_writel(out_params->stride, pxp->base + HW_PXP_OUT_PITCH);
+ if (out_params->pixel_fmt == PXP_PIX_FMT_RGB24)
+ __raw_writel(out_params->stride << 2,
+ pxp->base + HW_PXP_OUT_PITCH);
+ else if (out_params->pixel_fmt == PXP_PIX_FMT_RGB565)
+ __raw_writel(out_params->stride << 1,
+ pxp->base + HW_PXP_OUT_PITCH);
+ else
+ __raw_writel(out_params->stride, pxp->base + HW_PXP_OUT_PITCH);
}
static void pxp_set_s0colorkey(struct pxps *pxp)
@@ -390,6 +397,13 @@ static void pxp_set_oln(int layer_no, struct pxps *pxp)
__raw_writel(BF_PXP_OUT_AS_LRC_X(olparams_data->width) |
BF_PXP_OUT_AS_LRC_Y(olparams_data->height),
pxp->base + HW_PXP_OUT_AS_LRC);
+
+ if (olparams_data->pixel_fmt == PXP_PIX_FMT_RGB24)
+ __raw_writel(olparams_data->width << 2,
+ pxp->base + HW_PXP_AS_PITCH);
+ else
+ __raw_writel(olparams_data->width << 1,
+ pxp->base + HW_PXP_AS_PITCH);
}
static void pxp_set_olparam(int layer_no, struct pxps *pxp)
@@ -704,8 +718,9 @@ static void pxp_set_s0buf(struct pxps *pxp)
__raw_writel(V, pxp->base + HW_PXP_PS_VBUF);
}
- /* TODO: only support RGB565, Y8, Y4 */
- if (s0_params->pixel_fmt == PXP_PIX_FMT_GREY)
+ /* TODO: only support RGB565, Y8, Y4, YUV420 */
+ if (s0_params->pixel_fmt == PXP_PIX_FMT_GREY ||
+ s0_params->pixel_fmt == PXP_PIX_FMT_YUV420P)
__raw_writel(s0_params->width, pxp->base + HW_PXP_PS_PITCH);
else if (s0_params->pixel_fmt == PXP_PIX_FMT_GY04)
__raw_writel(s0_params->width >> 1, pxp->base + HW_PXP_PS_PITCH);