media: rockchip: isp: luma stream resolution alignment

Change-Id: If90d5d50dc1e55f28fd077c3651f65240c1010c0
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
Cai YiWei
2023-02-23 09:17:16 +08:00
committed by Tao Huang
parent 7702078207
commit 57bbb677f4

View File

@@ -604,8 +604,8 @@ static void restrict_rsz_resolution(struct rkisp_stream *stream,
} else if (stream->id == RKISP_STREAM_LUMA) {
u32 div = dev->is_bigmode ? 32 : 16;
max_rsz->width = input_win->width / div;
max_rsz->height = input_win->height / div;
max_rsz->width = ALIGN(DIV_ROUND_UP(input_win->width, div), 4);
max_rsz->height = DIV_ROUND_UP(input_win->height, div);
} else if (dev->hw_dev->is_unite) {
/* scale down only for unite mode */
max_rsz->width = min_t(int, input_win->width, cfg->max_rsz_width);