Commit 692f3ccc authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab

media: staging: rkisp1: don't support bayer format on selfpath resizer

The selfpath capture does not support bayer formats.
Therefore there is no reason to support bayer formats
on the selfpath resizer. The selfpath resizer should
support only MEDIA_BUS_FMT_YUYV8_2X8.
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 bac8bc57
......@@ -1176,13 +1176,6 @@ static int rkisp1_capture_link_validate(struct media_link *link)
struct v4l2_subdev_format sd_fmt;
int ret;
if (cap->id == RKISP1_SELFPATH &&
isp->src_fmt->mbus_code != MEDIA_BUS_FMT_YUYV8_2X8) {
dev_err(cap->rkisp1->dev,
"selfpath only supports MEDIA_BUS_FMT_YUYV8_2X8\n");
return -EPIPE;
}
if (cap_pix_enc != isp_pix_enc &&
!(isp_pix_enc == V4L2_PIXEL_ENC_YUV &&
cap_pix_enc == V4L2_PIXEL_ENC_RGB)) {
......
......@@ -437,6 +437,13 @@ static int rkisp1_rsz_enum_mbus_code(struct v4l2_subdev *sd,
u32 pad = code->pad;
int ret;
if (rsz->id == RKISP1_SELFPATH) {
if (code->index > 0)
return -EINVAL;
code->code = MEDIA_BUS_FMT_YUYV8_2X8;
return 0;
}
/* supported mbus codes are the same in isp video src pad */
code->pad = RKISP1_ISP_PAD_SOURCE_VIDEO;
ret = v4l2_subdev_call(&rsz->rkisp1->isp.sd, pad, enum_mbus_code,
......@@ -541,7 +548,11 @@ static void rkisp1_rsz_set_sink_fmt(struct rkisp1_resizer *rsz,
src_fmt = rkisp1_rsz_get_pad_fmt(rsz, cfg, RKISP1_RSZ_PAD_SRC, which);
sink_crop = rkisp1_rsz_get_pad_crop(rsz, cfg, RKISP1_RSZ_PAD_SINK,
which);
sink_fmt->code = format->code;
if (rsz->id == RKISP1_SELFPATH)
sink_fmt->code = MEDIA_BUS_FMT_YUYV8_2X8;
else
sink_fmt->code = format->code;
mbus_info = rkisp1_isp_mbus_info_get(sink_fmt->code);
if (!mbus_info || !(mbus_info->direction & RKISP1_ISP_SD_SRC)) {
sink_fmt->code = RKISP1_DEF_FMT;
......
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