media: vimc: deb: fix default sink bayer format
authorHelen Fornazier <helen.koike@collabora.com>
Wed, 6 Mar 2019 22:42:37 +0000 (17:42 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 19 Mar 2019 18:04:54 +0000 (14:04 -0400)
The format of the sink pad should be a bayer mbus format.

This fixes a kernel NULL pointer dereference error that was caused when
the stream starts because the configured format was not found in the
pixelmap table.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vimc/vimc-debayer.c

index eaed423..20826f2 100644 (file)
@@ -66,7 +66,7 @@ struct vimc_deb_device {
 static const struct v4l2_mbus_framefmt sink_fmt_default = {
        .width = 640,
        .height = 480,
-       .code = MEDIA_BUS_FMT_RGB888_1X24,
+       .code = MEDIA_BUS_FMT_SRGGB8_1X8,
        .field = V4L2_FIELD_NONE,
        .colorspace = V4L2_COLORSPACE_DEFAULT,
 };