MLK-16374-2: PxP: add new format support for as and out buffer
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Tue, 5 Sep 2017 09:58:02 +0000 (17:58 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:38:30 +0000 (15:38 -0500)
1) add PXP_PIX_FMT_BGRA32 format support for AS buffer
2) add PXP_PIX_FMT_BGRA32 format support for OUT buffer

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 4eeefd54cdbb8d1d3ffd64bd444ea7b759101a35)

drivers/dma/pxp/pxp_dma_v3.c

index a059a69..b4886d0 100644 (file)
@@ -1291,6 +1291,7 @@ static uint32_t pxp_parse_as_fmt(uint32_t format)
        uint32_t fmt_ctrl;
 
        switch (format) {
+       case PXP_PIX_FMT_BGRA32:
        case PXP_PIX_FMT_ARGB32:
                fmt_ctrl = BV_PXP_AS_CTRL_FORMAT__ARGB8888;
                break;
@@ -1335,6 +1336,7 @@ static uint32_t pxp_parse_out_fmt(uint32_t format)
        uint32_t fmt_ctrl;
 
        switch (format) {
+       case PXP_PIX_FMT_BGRA32:
        case PXP_PIX_FMT_ARGB32:
                fmt_ctrl = BV_PXP_OUT_CTRL_FORMAT__ARGB8888;
                break;
@@ -1892,6 +1894,7 @@ static bool fmt_as_support(uint32_t format)
        case PXP_PIX_FMT_ARGB32:
        case PXP_PIX_FMT_RGBA32:
        case PXP_PIX_FMT_XRGB32:
+       case PXP_PIX_FMT_BGRA32:
        case PXP_PIX_FMT_ARGB555:
        case PXP_PIX_FMT_ARGB444:
        case PXP_PIX_FMT_RGBA555:
@@ -1910,6 +1913,7 @@ static bool fmt_out_support(uint32_t format)
        switch (format) {
        case PXP_PIX_FMT_ARGB32:
        case PXP_PIX_FMT_XRGB32:
+       case PXP_PIX_FMT_BGRA32:
        case PXP_PIX_FMT_RGB24:
        case PXP_PIX_FMT_ARGB555:
        case PXP_PIX_FMT_ARGB444: