Commit e3ab0d3c authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz Committed by Martin Kepplinger
Browse files

media: imx: Round line size to 4 bytes



Section 13.7.6.13 "CSI Image Parameter Register" of the
i.MX 8M Quad Applications Processors Reference Manual
states that the line size should be divisible by 8 bytes.
However, the hardware also accepts sizes divisible by 4 bytes.

This patch accepts line sizes divisible 4-bytes in non-planar mode.
Signed-off-by: Dorota Czaplejewicz's avatarDorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
parent 51d4b4d3
Pipeline #71935 passed with stage
in 67 minutes and 29 seconds
......@@ -545,13 +545,13 @@ int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix,
}
/* Round up width for minimum burst size */
width = round_up(mbus->width, 8);
width = round_up(mbus->width, 4);
/* Round up stride for IDMAC line start address alignment */
if (cc->planar)
stride = round_up(width, 16);
else
stride = round_up((width * cc->bpp) >> 3, 8);
stride = round_up((width * cc->bpp) >> 3, 4);
pix->width = width;
pix->height = mbus->height;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment