media: imx-jpeg: Identify and handle precision correctly
authorMing Qian <ming.qian@nxp.com>
Wed, 23 Mar 2022 09:05:55 +0000 (10:05 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:18 +0000 (11:02 +0200)
commitbec0a3a67389ede106d0661a007edf832878d8b2
treec3609733b9f8e2cb9b630035530b600b9a5c149e
parent8dd504a3a0a5f73b4c137ce3afc35936a4ecd871
media: imx-jpeg: Identify and handle precision correctly

The decoder will save the precision that was detected from jpeg header
and use it later, when choosing the pixel format and also calculate
bytesperline according to precision.

The 12bit jpeg is not supported yet,
but driver shouldn't led to serious problem if user enqueue a 12 bit jpeg.
And the 12bit jpeg is supported by hardware, driver may support it later.

[hverkuil: document the new precision field]

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h