gpu: ipu-v3: add YUV 4:4:4 support
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 18 Oct 2016 11:36:33 +0000 (13:36 +0200)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 20 Oct 2016 12:40:10 +0000 (14:40 +0200)
The IDMAC does support reading and writing DRM_FORMAT_YUV444 and
DRM_FORMAT_YVU444.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Liu Ying <gnuiyl@gmail.com>
drivers/gpu/ipu-v3/ipu-common.c
drivers/gpu/ipu-v3/ipu-cpmem.c

index b9539f7c5e9adc43f4acc91db35226371699e919..b7d7bd6e3d60d63f7d80c0c71915820aa09c60f0 100644 (file)
@@ -88,6 +88,8 @@ enum ipu_color_space ipu_drm_fourcc_to_colorspace(u32 drm_fourcc)
        case DRM_FORMAT_YVU420:
        case DRM_FORMAT_YUV422:
        case DRM_FORMAT_YVU422:
+       case DRM_FORMAT_YUV444:
+       case DRM_FORMAT_YVU444:
        case DRM_FORMAT_NV12:
        case DRM_FORMAT_NV21:
        case DRM_FORMAT_NV16:
index f3ca1d6c02d022813155f7f5fbe2acaa34a7efe7..4b2b67113d92db03a7700b768b9cdf0e559c2b0a 100644 (file)
@@ -554,6 +554,13 @@ int ipu_cpmem_set_fmt(struct ipuv3_channel *ch, u32 drm_fourcc)
                /* burst size */
                ipu_ch_param_write_field(ch, IPU_FIELD_NPB, 31);
                break;
+       case DRM_FORMAT_YUV444:
+       case DRM_FORMAT_YVU444:
+               /* pix format */
+               ipu_ch_param_write_field(ch, IPU_FIELD_PFS, 0);
+               /* burst size */
+               ipu_ch_param_write_field(ch, IPU_FIELD_NPB, 31);
+               break;
        case DRM_FORMAT_NV12:
                /* pix format */
                ipu_ch_param_write_field(ch, IPU_FIELD_PFS, 4);