diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2012-11-12 16:29:02 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-13 15:07:32 -0800 |
commit | 0125f21b2bafde5e8dc34a31c20d2db6f3645bdc (patch) | |
tree | 3f8e03b1d6b2f1d14f1159e65cf70aa05d4359df /drivers/staging/imx-drm | |
parent | a8e4e232bab3387af5f9ee92713d1a511e249107 (diff) | |
download | blackbird-op-linux-0125f21b2bafde5e8dc34a31c20d2db6f3645bdc.tar.gz blackbird-op-linux-0125f21b2bafde5e8dc34a31c20d2db6f3645bdc.zip |
staging: drm/imx: Add ipu_cpmem_set_yuv_interleaved()
For configuring interleaved formats.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/imx-drm')
-rw-r--r-- | drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h | 1 | ||||
-rw-r--r-- | drivers/staging/imx-drm/ipu-v3/ipu-common.c | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h index 74158dd73758..22c1196579b0 100644 --- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h +++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h @@ -293,6 +293,7 @@ static inline void ipu_cpmem_interlaced_scan(struct ipu_ch_param *p, void ipu_cpmem_set_yuv_planar(struct ipu_ch_param __iomem *p, u32 pixel_format, int stride, int height); +void ipu_cpmem_set_yuv_interleaved(struct ipu_ch_param *p, u32 pixel_format); void ipu_cpmem_set_yuv_planar_full(struct ipu_ch_param __iomem *p, u32 pixel_format, int stride, int u_offset, int v_offset); int ipu_cpmem_set_fmt(struct ipu_ch_param __iomem *cpmem, u32 pixelformat); diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c index 7f3a3aeb88a2..eaa6f62a9e33 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c @@ -225,6 +225,23 @@ int ipu_cpmem_set_format_passthrough(struct ipu_ch_param __iomem *p, } EXPORT_SYMBOL_GPL(ipu_cpmem_set_format_passthrough); +void ipu_cpmem_set_yuv_interleaved(struct ipu_ch_param *p, u32 pixel_format) +{ + switch (pixel_format) { + case V4L2_PIX_FMT_UYVY: + ipu_ch_param_write_field(p, IPU_FIELD_BPP, 3); /* bits/pixel */ + ipu_ch_param_write_field(p, IPU_FIELD_PFS, 0xA); /* pix format */ + ipu_ch_param_write_field(p, IPU_FIELD_NPB, 31); /* burst size */ + break; + case V4L2_PIX_FMT_YUYV: + ipu_ch_param_write_field(p, IPU_FIELD_BPP, 3); /* bits/pixel */ + ipu_ch_param_write_field(p, IPU_FIELD_PFS, 0x8); /* pix format */ + ipu_ch_param_write_field(p, IPU_FIELD_NPB, 31); /* burst size */ + break; + } +} +EXPORT_SYMBOL_GPL(ipu_cpmem_set_yuv_interleaved); + void ipu_cpmem_set_yuv_planar_full(struct ipu_ch_param __iomem *p, u32 pixel_format, int stride, int u_offset, int v_offset) { |