From: Hans Verkuil <hans.verkuil@xxxxxxxxx> After testing I discovered that the color ordering for the RGB444 format was wrong. This is now fixed. In addition support is added for the XRGB444 format, which is identical to RGB444, but makes it explicit that there is no alpha, as is the case here. Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> --- drivers/media/platform/marvell-ccic/mcam-core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c index 3f016fb..17f5931 100644 --- a/drivers/media/platform/marvell-ccic/mcam-core.c +++ b/drivers/media/platform/marvell-ccic/mcam-core.c @@ -145,6 +145,13 @@ static struct mcam_format_struct { .planar = true, }, { + .desc = "XRGB 444", + .pixelformat = V4L2_PIX_FMT_XRGB444, + .mbus_code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, + .bpp = 2, + .planar = false, + }, + { .desc = "RGB 444", .pixelformat = V4L2_PIX_FMT_RGB444, .mbus_code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, @@ -794,8 +801,9 @@ static void mcam_ctlr_image(struct mcam_camera *cam) C0_DF_YUV | C0_YUV_PACKED | C0_YUVE_SWAP24, C0_DF_MASK); break; case V4L2_PIX_FMT_RGB444: + case V4L2_PIX_FMT_XRGB444: mcam_reg_write_mask(cam, REG_CTRL0, - C0_DF_RGB | C0_RGBF_444 | C0_RGB4_XRGB, C0_DF_MASK); + C0_DF_RGB | C0_RGBF_444 | C0_RGB4_XBGR, C0_DF_MASK); /* Alpha value? */ break; case V4L2_PIX_FMT_RGB565: -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html