From c69d37b0d62bf0c13b242fd67b421f1db138c242 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Fri, 1 Jul 2011 14:47:58 +0800 Subject: [PATCH] ENGR00152359-2 ipuv3: add VYU444 fmt 1.add VYU444 fmt to support Sii902x hdmi yuv format 2.make pixel clock from internal ipu clock more accurate Signed-off-by: Jason Chen --- drivers/mxc/ipu3/ipu_disp.c | 2 ++ drivers/mxc/ipu3/ipu_param_mem.h | 7 +++++++ include/linux/ipu.h | 1 + 3 files changed, 10 insertions(+) diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c index 5e92fbba53c3..38884c6705a4 100644 --- a/drivers/mxc/ipu3/ipu_disp.c +++ b/drivers/mxc/ipu3/ipu_disp.c @@ -898,6 +898,7 @@ void _ipu_init_dc_mappings(struct ipu_soc *ipu) _ipu_dc_map_link(ipu, 12, 5, 2, 5, 1, 5, 0); /* IPU_PIX_FMT_GBR24 */ + /* IPU_PIX_FMT_VYU444 */ _ipu_dc_map_clear(ipu, 13); _ipu_dc_map_link(ipu, 13, 0, 2, 0, 0, 0, 1); @@ -929,6 +930,7 @@ int _ipu_pixfmt_to_map(uint32_t fmt) case IPU_PIX_FMT_YVYU: return 12; case IPU_PIX_FMT_GBR24: + case IPU_PIX_FMT_VYU444: return 13; case IPU_PIX_FMT_BGR24: return 14; diff --git a/drivers/mxc/ipu3/ipu_param_mem.h b/drivers/mxc/ipu3/ipu_param_mem.h index 734cb7f95c9b..d7167f7831e4 100644 --- a/drivers/mxc/ipu3/ipu_param_mem.h +++ b/drivers/mxc/ipu3/ipu_param_mem.h @@ -224,6 +224,13 @@ static inline void _ipu_ch_param_init(struct ipu_soc *ipu, int ch, _ipu_ch_params_set_packing(¶ms, 8, 16, 8, 8, 8, 0, 8, 24); break; + case IPU_PIX_FMT_VYU444: + ipu_ch_param_set_field(¶ms, 0, 107, 3, 1); /* bits/pixel */ + ipu_ch_param_set_field(¶ms, 1, 85, 4, 7); /* pix format */ + ipu_ch_param_set_field(¶ms, 1, 78, 7, 19); /* burst size */ + + _ipu_ch_params_set_packing(¶ms, 8, 8, 8, 0, 8, 16, 8, 24); + break; case IPU_PIX_FMT_BGRA32: case IPU_PIX_FMT_BGR32: ipu_ch_param_set_field(¶ms, 0, 107, 3, 0); /* bits/pixel */ diff --git a/include/linux/ipu.h b/include/linux/ipu.h index b386b868563c..4edf74ee889b 100644 --- a/include/linux/ipu.h +++ b/include/linux/ipu.h @@ -126,6 +126,7 @@ typedef enum { #define IPU_PIX_FMT_VYUY fourcc('V', 'Y', 'U', 'Y') /*!< 16 VYYU 4:2:2 */ #define IPU_PIX_FMT_Y41P fourcc('Y', '4', '1', 'P') /*!< 12 YUV 4:1:1 */ #define IPU_PIX_FMT_YUV444 fourcc('Y', '4', '4', '4') /*!< 24 YUV 4:4:4 */ +#define IPU_PIX_FMT_VYU444 fourcc('V', '4', '4', '4') /*!< 24 VYU 4:4:4 */ /* two planes -- one Y, one Cb + Cr interleaved */ #define IPU_PIX_FMT_NV12 fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ /*! @} */ -- 2.39.5