media: rockchip: cif fixed err when get vc fail

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib7a6158dfaafbca49ac8df6374c708be9926814e
This commit is contained in:
Zefa Chen
2021-11-17 19:57:34 +08:00
committed by Tao Huang
parent 249c2f83a6
commit 17517804c1

View File

@@ -3394,7 +3394,11 @@ static int rkcif_sanity_check_fmt(struct rkcif_stream *stream,
return -EINVAL;
}
stream->vc = vc;
if (vc >= 0 && vc < RKCIF_MAX_STREAM_MIPI)
stream->vc = vc;
else
stream->vc = stream->id;
if (stream->cif_fmt_in->mbus_code == MEDIA_BUS_FMT_EBD_1X8 ||
stream->cif_fmt_in->mbus_code == MEDIA_BUS_FMT_SPD_2X8) {
stream->crop_enable = false;