From 66c8c24cfec30912cf6d4e3676d010b055353e00 Mon Sep 17 00:00:00 2001 From: Cai YiWei Date: Mon, 10 Aug 2020 11:23:12 +0800 Subject: [PATCH] media: rockchip: ispp: limit max width 2080 for scl0 yuv420 hardware support max width is 2080 for scl0 yuv420 vertical scale down output. Change-Id: Ifead97e0bbba417a4e35bea3e4eba3e33ea8d407 Signed-off-by: Cai YiWei --- drivers/media/platform/rockchip/ispp/stream.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/rockchip/ispp/stream.c b/drivers/media/platform/rockchip/ispp/stream.c index 102334d63c20..2b3464eef947 100644 --- a/drivers/media/platform/rockchip/ispp/stream.c +++ b/drivers/media/platform/rockchip/ispp/stream.c @@ -1171,7 +1171,12 @@ static int limit_check_scl(struct rkispp_stream *stream, return ret; if (stream->id == STREAM_S0) { - max_width = 3264; + u32 fmt = stream->out_cap_fmt.wr_fmt; + + if (*h == sdev->out_fmt.height || (fmt & FMT_YUV422)) + max_width = 3264; + else + max_width = 2080; min_ratio = 1; }