[media] marvell-ccic: fix V4L2_PIX_FMT_SBGGR8 support
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 14 Mar 2015 11:47:01 +0000 (08:47 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 1 May 2015 10:50:28 +0000 (07:50 -0300)
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 <hans.verkuil@cisco.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/marvell-ccic/mcam-core.c

index 7af4265e689eb5054528e050a2fcf233af838a3d..42f63974592ca8ce33409ad45f50640559c37a98 100644 (file)
@@ -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;