- Add Y4 output format for SPDC.
Signed-off-by: Fugang Duan <B38611@freescale.com>
/*
- * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
+ * Copyright (C) 2010-2012 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
(pix_fmt == PXP_PIX_FMT_YUV444) |
(pix_fmt == PXP_PIX_FMT_NV12) |
(pix_fmt == PXP_PIX_FMT_GREY) |
+ (pix_fmt == PXP_PIX_FMT_GY04) |
(pix_fmt == PXP_PIX_FMT_YVU410P) |
(pix_fmt == PXP_PIX_FMT_YUV410P) |
(pix_fmt == PXP_PIX_FMT_YVU420P) |
case PXP_PIX_FMT_GREY:
fmt_ctrl = BV_PXP_CTRL_S0_FORMAT__YUV420;
break;
+ case PXP_PIX_FMT_GY04:
+ fmt_ctrl = BV_PXP_CTRL_S0_FORMAT__YUV420;
+ break;
case PXP_PIX_FMT_YUV422P:
fmt_ctrl = BV_PXP_CTRL_S0_FORMAT__YUV422;
break;
case PXP_PIX_FMT_GREY:
fmt_ctrl = BV_PXP_CTRL_OUTBUF_FORMAT__MONOC8;
break;
+ case PXP_PIX_FMT_GY04:
+ fmt_ctrl = BV_PXP_CTRL_OUTBUF_FORMAT__MONOC4;
+ break;
default:
fmt_ctrl = 0;
}
__raw_writel(U, pxp->base + HW_PXP_S0UBUF);
__raw_writel(V, pxp->base + HW_PXP_S0VBUF);
}
+
+ /* TODO: only support RGB565, Y8 , Y4 */
+ if (s0_params->pixel_fmt == PXP_PIX_FMT_GREY)
+ __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);
+ else
+ __raw_writel(s0_params->width * 2, pxp->base + HW_PXP_PS_PITCH);
}
/**
(pix_fmt == PXP_PIX_FMT_YUV444) |
(pix_fmt == PXP_PIX_FMT_NV12) |
(pix_fmt == PXP_PIX_FMT_GREY) |
+ (pix_fmt == PXP_PIX_FMT_GY04) |
(pix_fmt == PXP_PIX_FMT_YVU410P) |
(pix_fmt == PXP_PIX_FMT_YUV410P) |
(pix_fmt == PXP_PIX_FMT_YVU420P) |
case PXP_PIX_FMT_GREY:
fmt_ctrl = BV_PXP_PS_CTRL_FORMAT__Y8;
break;
+ case PXP_PIX_FMT_GY04:
+ fmt_ctrl = BV_PXP_PS_CTRL_FORMAT__Y4;
+ break;
case PXP_PIX_FMT_YUV422P:
fmt_ctrl = BV_PXP_PS_CTRL_FORMAT__YUV422;
break;
case PXP_PIX_FMT_GREY:
fmt_ctrl = BV_PXP_OUT_CTRL_FORMAT__Y8;
break;
+ case PXP_PIX_FMT_GY04:
+ fmt_ctrl = BV_PXP_OUT_CTRL_FORMAT__Y4;
+ break;
default:
fmt_ctrl = 0;
}
__raw_writel(V, pxp->base + HW_PXP_PS_VBUF);
}
- /* TODO: only support RGB565, Y8 */
+ /* TODO: only support RGB565, Y8, Y4 */
if (s0_params->pixel_fmt == PXP_PIX_FMT_GREY)
__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);
else
__raw_writel(s0_params->width * 2, pxp->base + HW_PXP_PS_PITCH);
}
/*! @name YUV Planar Formats */
/*! @{ */
#define PXP_PIX_FMT_GREY fourcc('G', 'R', 'E', 'Y') /*!< 8 Greyscale */
+#define PXP_PIX_FMT_GY04 fourcc('G', 'Y', '0', '4') /*!< 4 Greyscale */
#define PXP_PIX_FMT_YVU410P fourcc('Y', 'V', 'U', '9') /*!< 9 YVU 4:1:0 */
#define PXP_PIX_FMT_YUV410P fourcc('Y', 'U', 'V', '9') /*!< 9 YUV 4:1:0 */
#define PXP_PIX_FMT_YVU420P fourcc('Y', 'V', '1', '2') /*!< 12 YVU 4:2:0 */