diff options
author | Fancy Fang <chen.fang@freescale.com> | 2015-04-07 18:18:33 +0800 |
---|---|---|
committer | Frank Li <Frank.Li@freescale.com> | 2015-04-24 23:03:33 +0800 |
commit | a9dd7ac6b34bf836b577b843948e3c86a664a464 (patch) | |
tree | 908c6a6bf6bbd7bd144776e588a32a340252fd62 | |
parent | 509cf28d9aef156ccdf56c91be9d9a24cfdce70c (diff) |
MLK-10594 dma: pxp-v3: add RGB15 format support
Add 'RGB15' format support for AS, PS and OUT channels
for some multimedia applications.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
(cherry picked from commit 44b77612112d57ab54aabbb5d81e2df688646edd)
-rw-r--r-- | drivers/dma/pxp/pxp_dma_v3.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v3.c b/drivers/dma/pxp/pxp_dma_v3.c index 9eaa27a70dd0..56059117413b 100644 --- a/drivers/dma/pxp/pxp_dma_v3.c +++ b/drivers/dma/pxp/pxp_dma_v3.c @@ -560,7 +560,8 @@ static void pxp_set_outbuf(struct pxps *pxp) out_params->pixel_fmt == PXP_PIX_FMT_RGB32) { __raw_writel(out_params->stride << 2, pxp->base + HW_PXP_OUT_PITCH); - } else if (out_params->pixel_fmt == PXP_PIX_FMT_RGB565) { + } else if ((out_params->pixel_fmt == PXP_PIX_FMT_RGB565) || + (out_params->pixel_fmt == PXP_PIX_FMT_RGB555)) { __raw_writel(out_params->stride << 1, pxp->base + HW_PXP_OUT_PITCH); } else if (out_params->pixel_fmt == PXP_PIX_FMT_UYVY || @@ -647,11 +648,12 @@ static void pxp_set_oln(int layer_no, struct pxps *pxp) pxp->base + HW_PXP_OUT_AS_LRC); } - if ((olparams_data->pixel_fmt == PXP_PIX_FMT_BGRA32) | + if ((olparams_data->pixel_fmt == PXP_PIX_FMT_BGRA32) || (olparams_data->pixel_fmt == PXP_PIX_FMT_RGB32)) { __raw_writel(pitch << 2, pxp->base + HW_PXP_AS_PITCH); - } else if (olparams_data->pixel_fmt == PXP_PIX_FMT_RGB565) { + } else if ((olparams_data->pixel_fmt == PXP_PIX_FMT_RGB565) || + (olparams_data->pixel_fmt == PXP_PIX_FMT_RGB555)) { __raw_writel(pitch << 1, pxp->base + HW_PXP_AS_PITCH); } else { @@ -681,7 +683,11 @@ static void pxp_set_olparam(int layer_no, struct pxps *pxp) } else if (olparams_data->pixel_fmt == PXP_PIX_FMT_RGB565) { olparam |= BF_PXP_AS_CTRL_FORMAT(BV_PXP_AS_CTRL_FORMAT__RGB565); + } else if (olparams_data->pixel_fmt == PXP_PIX_FMT_RGB555) { + olparam |= + BF_PXP_AS_CTRL_FORMAT(BV_PXP_AS_CTRL_FORMAT__RGB555); } + if (olparams_data->global_alpha_enable) { if (olparams_data->global_override) { olparam |= @@ -1087,7 +1093,8 @@ static void pxp_set_s0buf(struct pxps *pxp) Y = s0_params->paddr; - if (s0_params->pixel_fmt == PXP_PIX_FMT_RGB565) + if ((s0_params->pixel_fmt == PXP_PIX_FMT_RGB565) || + (s0_params->pixel_fmt == PXP_PIX_FMT_RGB555)) bpp = 2; else if (s0_params->pixel_fmt == PXP_PIX_FMT_RGB32) bpp = 4; @@ -1159,7 +1166,8 @@ static void pxp_set_s0buf(struct pxps *pxp) s0_params->pixel_fmt == PXP_PIX_FMT_YVYU) __raw_writel(pitch << 1, pxp->base + HW_PXP_PS_PITCH); - else if (s0_params->pixel_fmt == PXP_PIX_FMT_RGB565) + else if ((s0_params->pixel_fmt == PXP_PIX_FMT_RGB565) || + (s0_params->pixel_fmt == PXP_PIX_FMT_RGB555)) __raw_writel(pitch << 1, pxp->base + HW_PXP_PS_PITCH); else |