media: rockchip: isp: selfpath bytesperline 16 align

Change-Id: I39b36e7e3a8c483f5c77ddbea0f6bebb4e1a0b0a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
Cai YiWei
2021-09-04 14:37:31 +08:00
parent 4ab1cc1b50
commit 6bb1c3663d

View File

@@ -629,6 +629,9 @@ static int rkisp_set_fmt(struct rkisp_stream *stream,
bytesperline = ALIGN(width * fmt->bpp[i] / 8, 256);
else
bytesperline = width * DIV_ROUND_UP(fmt->bpp[i], 8);
/* 128bit AXI, 16byte align for bytesperline */
if (dev->isp_ver >= ISP_V20 && stream->id == RKISP_STREAM_SP)
bytesperline = ALIGN(bytesperline, 16);
/* stride is only available for sp stream and y plane */
if (stream->id != RKISP_STREAM_SP || i != 0 ||
plane_fmt->bytesperline < bytesperline)