media: imx: imx7-mipi-csis: Align image width based on format
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 12 Mar 2020 23:47:16 +0000 (00:47 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 10:43:41 +0000 (12:43 +0200)
commitb06bde9ac6836902f1fb50f69493d02d4191d5aa
tree8edf9430b6715028f2bae84bd27b80bd0c50b28c
parenta0ec36a364a73d3af1c7387250a5135d54600d5c
media: imx: imx7-mipi-csis: Align image width based on format

The total number of bits per line needs to be a multiple of 8, which
requires aligning the image width based on the format width. The
csis_pix_format structure contains a pix_width_alignment field that
serves this purpose, but the field is never set. Instead of fixing that,
calculate the alignment constraints based on the bus width for the
format, and drop the unneeded pix_width_alignment field.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx7-mipi-csis.c