MLK-22401: mxc-jpeg: No image shown on the screen if set resolution to 333x333
authorMirela Rabulea <mirela.rabulea@nxp.com>
Tue, 6 Aug 2019 12:56:09 +0000 (15:56 +0300)
committerMirela Rabulea <mirela.rabulea@nxp.com>
Thu, 8 Aug 2019 06:54:05 +0000 (09:54 +0300)
commit9808fdc11bdc2693241e5a3ad3982231974a6137
treeb5ffd2f4250adad81f20da9875e0aa40abf9be71
parentd2c2cdb11b29fb30fedb0c17620a95955c876fb8
MLK-22401: mxc-jpeg: No image shown on the screen if set resolution to 333x333

Negotiate the resolution during try_fmt/s_fmt ioctls by aligning down,
according to the format restrictions. For the height, loosen up the
restriction to multiple of 8, in order to support NV12 1080p, even if
normally the restriction for NV12 is multiple of 16.

Use v4l_bound_align_image instead of mxc_jpeg_bound_align_image, and
remove mxc_jpeg_bound_align_image, as not needed any more.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
drivers/media/platform/imx8/mxc-jpeg.c