media: imx-jpeg: Support dynamic resolution change
authorMing Qian <ming.qian@nxp.com>
Wed, 23 Mar 2022 09:05:58 +0000 (10:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:21 +0000 (14:23 +0200)
commit88355f7b682be4ab6c529c9fc3c5992d781856cf
tree9639c5adbb9d8a11b33fa0a4a63b787c341c9286
parent07888b84f3706fb73b993b22a07093ed6bc2c00f
media: imx-jpeg: Support dynamic resolution change

[ Upstream commit b4e1fb8643daabba850e97df532191acffc23e6a ]

To support dynamic resolution change,
driver should meet the following conditions:
1. the previous pictures are all decoded before source change event.
2. prevent decoding new resolution pictures with incorrect capture
   buffer, until user handle source change event and setup capture.
3. report correct fmt and resolution during source change.

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