From 8380b7e449d800037330011c4e0ab5caeab91a6b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 14 Mar 2015 08:47:01 -0300 Subject: [PATCH] [media] marvell-ccic: fix V4L2_PIX_FMT_SBGGR8 support The REG_CTRL0 register was never written if this format was selected, instead an error was logged and whatever was last set in that register was used. Surprisingly, that seems to work if YUYV was selected, but we should program this register explicitly. Signed-off-by: Hans Verkuil Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/marvell-ccic/mcam-core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c index 7af4265e689e..42f63974592c 100644 --- a/drivers/media/platform/marvell-ccic/mcam-core.c +++ b/drivers/media/platform/marvell-ccic/mcam-core.c @@ -786,6 +786,10 @@ static void mcam_ctlr_image(struct mcam_camera *cam) mcam_reg_write_mask(cam, REG_CTRL0, C0_DF_RGB | C0_RGBF_565 | C0_RGB5_BGGR, C0_DF_MASK); break; + case V4L2_PIX_FMT_SBGGR8: + mcam_reg_write_mask(cam, REG_CTRL0, + C0_DF_RGB | C0_RGB5_GRBG, C0_DF_MASK); + break; default: cam_err(cam, "camera: unknown format: %#x\n", fmt->pixelformat); break; -- 2.39.5