From b873c8d42f11b1ddc224fab2bca7dbb973bdff70 Mon Sep 17 00:00:00 2001 From: Cai YiWei Date: Mon, 14 Sep 2020 17:58:24 +0800 Subject: [PATCH] media: rockchip: ispp: fix scl0 format check error Change-Id: I05cdeb3461d0ce27060d3154159dd4f9f642222a Signed-off-by: Cai YiWei --- drivers/media/platform/rockchip/ispp/stream.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/rockchip/ispp/stream.c b/drivers/media/platform/rockchip/ispp/stream.c index 890999a35b78..bec36a5eab58 100644 --- a/drivers/media/platform/rockchip/ispp/stream.c +++ b/drivers/media/platform/rockchip/ispp/stream.c @@ -1233,6 +1233,7 @@ static int limit_check_scl(struct rkispp_stream *stream, u32 max_width = 1280, max_ratio = 8, min_ratio = 2; u32 *w = try_fmt ? &try_fmt->width : &stream->out_fmt.width; u32 *h = try_fmt ? &try_fmt->height : &stream->out_fmt.height; + u32 forcc = try_fmt ? try_fmt->pixelformat : stream->out_fmt.pixelformat; int ret = 0; /* bypass scale */ @@ -1240,9 +1241,7 @@ static int limit_check_scl(struct rkispp_stream *stream, return ret; if (stream->id == STREAM_S0) { - u32 fmt = stream->out_cap_fmt.wr_fmt; - - if (*h == sdev->out_fmt.height || (fmt & FMT_YUV422)) + if (*h == sdev->out_fmt.height || (forcc == V4L2_PIX_FMT_NV16)) max_width = 3264; else max_width = 2080;