Commit d787490d authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

imx: Fix rounding values

The commit message mentions 8-pixels alignment, whereas rounding is performed to 2^8.
For the width, the rounding factor is 8-pixels, according to the data sheet.
This indicates that the author misunderstood the round_up() semantics in the neighboring roundings too.
parent 00082f89
Pipeline #71292 passed with stage
in 65 minutes and 57 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, 3);
/* Round up stride for IDMAC line start address alignment */
if (cc->planar)
stride = round_up(width, 16);
stride = round_up(width, 4);
else
stride = round_up((width * cc->bpp) >> 3, 8);
stride = round_up((width * cc->bpp) >> 3, 3);
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