media: hantro: jpeg: Add COM segment to JPEG header to align image scan
authorChen-Yu Tsai <wenst@chromium.org>
Fri, 7 Jan 2022 09:34:52 +0000 (10:34 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 28 Jan 2022 12:24:47 +0000 (13:24 +0100)
commit00b5359bac5aea8ff20c3a55fd90cfdb1d49c835
tree03cd0131ce587ae7c7a97f3bab9acc33026dc541
parente90410d1304e93c74ac4f87338f665e44129a79c
media: hantro: jpeg: Add COM segment to JPEG header to align image scan

The JPEG header size is not 64-bit aligned. This makes the driver
require a bounce buffer for the encoded JPEG image scan output.

Add a COM (comment) segment to the JPEG header so that the header size
is a multiple of 64 bits. This will then allow dropping the use of the
bounce buffer, and instead have the hardware write out to the capture
buffer directly.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/hantro/hantro_jpeg.c
drivers/staging/media/hantro/hantro_jpeg.h