Commit 0ec314ff authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab

media: staging: rkisp1: fix configuration for GREY pixelformat

This patch changes the device configuration to support capture
of V4L2_PIX_FMT_GREY video. The 'write_format' field of the format
description should be planar.
Also the array 'pixm->plane_fmt' that describes the planes should
be memset to 0 before filling it since the the cb, cr planes should
be 0.
Signed-off-by: default avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 6803a9e0
...@@ -120,7 +120,7 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = { ...@@ -120,7 +120,7 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_mp_fmts[] = {
{ {
.fourcc = V4L2_PIX_FMT_GREY, .fourcc = V4L2_PIX_FMT_GREY,
.uv_swap = 0, .uv_swap = 0,
.write_format = RKISP1_MI_CTRL_MP_WRITE_YUVINT, .write_format = RKISP1_MI_CTRL_MP_WRITE_YUV_PLA_OR_RAW8,
.mbus = MEDIA_BUS_FMT_YUYV8_2X8, .mbus = MEDIA_BUS_FMT_YUYV8_2X8,
}, },
/* yuv420 */ /* yuv420 */
...@@ -248,7 +248,7 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = { ...@@ -248,7 +248,7 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = {
{ {
.fourcc = V4L2_PIX_FMT_GREY, .fourcc = V4L2_PIX_FMT_GREY,
.uv_swap = 0, .uv_swap = 0,
.write_format = RKISP1_MI_CTRL_SP_WRITE_INT, .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA,
.output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV400, .output_format = RKISP1_MI_CTRL_SP_OUTPUT_YUV400,
.mbus = MEDIA_BUS_FMT_YUYV8_2X8, .mbus = MEDIA_BUS_FMT_YUYV8_2X8,
}, },
...@@ -1059,6 +1059,7 @@ rkisp1_fill_pixfmt(struct v4l2_pix_format_mplane *pixm, ...@@ -1059,6 +1059,7 @@ rkisp1_fill_pixfmt(struct v4l2_pix_format_mplane *pixm,
unsigned int i; unsigned int i;
u32 stride; u32 stride;
memset(pixm->plane_fmt, 0, sizeof(pixm->plane_fmt));
info = v4l2_format_info(pixm->pixelformat); info = v4l2_format_info(pixm->pixelformat);
pixm->num_planes = info->mem_planes; pixm->num_planes = info->mem_planes;
stride = info->bpp[0] * pixm->width; stride = info->bpp[0] * pixm->width;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment