]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: imx-jpeg: Leave a blank space before the configuration data
authorMing Qian <ming.qian@nxp.com>
Mon, 30 May 2022 07:48:37 +0000 (08:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:40:50 +0000 (14:40 +0200)
commit40efeabe5364b46baee7b9caf4b6d271fad52263
treed14c49c5a6210745895b2316d7985826ba06e4d6
parentf570faeda0c2414f90119f7e8e0185e12a05c328
media: imx-jpeg: Leave a blank space before the configuration data

[ Upstream commit 6285cdea19daf764bf00f662a59fc83ef67345cf ]

There is a hardware bug that it will load
the first 128 bytes of configuration data twice,
it will led to some configure error.
so shift the configuration data 128 bytes,
and make the first 128 bytes all zero,
then hardware will load the 128 zero twice,
and ignore them as garbage.
then the configuration data can be loaded correctly

Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.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/nxp/imx-jpeg/mxc-jpeg.c