]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:21 +0000 (14:23 +0200)
commit6a86427363ce7b524076c3ce0855a409a431bf72
treea1019724b2cb6741891c5cfb0a11642d2e8a6e0f
parent42a6e193405a7ec5d8d769f507adba2ef0228d62
media: imx-jpeg: Identify and handle precision correctly

[ Upstream commit 003a6ff0600c2e63cdb12d604bbec42008270c1e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/imx-jpeg/mxc-jpeg.c
drivers/media/platform/imx-jpeg/mxc-jpeg.h