linux-stable/drivers/media
Ming Qian e33f30bf3e media: amphion: fix a bug that vpu core may not resume after suspend
[ Upstream commit 0202a665bf ]

driver will enable the vpu core when request the first instance
on the core.
one vpu core can only support 8 streaming instances in the same
time, the instance won't be added to core's list before streamon.

so the actual instance count may be greater then the number in
the core's list.

in pm resume callback, driver will resume the core immediately if
core's list is not empty.
but this check is not accurate,
if suspend during one instance is requested, but not streamon,
then after suspend, the core won't be resume, and led to instance failure.

use the request_count instead of the core's list to check
whether is the core needed to resume immediately after suspend.

And it can make the pm suspend and resume callback more clear.

Fixes: 9f599f351e ("media: amphion: add vpu core driver")
Signed-off-by: Ming Qian <ming.qian@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>
2022-10-21 12:38:41 +02:00
..
cec media: platform: cros-ec: Add kinox to the match table 2022-06-27 08:54:29 +01:00
common media: videobuf2: Introduce vb2_find_buffer() 2022-07-17 11:10:11 +01:00
dvb-core media: dvb_vb2: fix possible out of bound access 2022-09-27 10:24:44 +02:00
dvb-frontends media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
firewire media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00
i2c sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
mc media: mc-entity: Add a new helper function to get a remote pad for a pad 2022-07-17 11:23:51 +01:00
mmc media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
pci media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first() 2022-07-17 11:21:35 +01:00
platform media: amphion: fix a bug that vpu core may not resume after suspend 2022-10-21 12:38:41 +02:00
radio media: make RADIO_ADAPTERS tristate 2022-05-13 11:02:19 +02:00
rc media: mceusb: Use new usb_control_msg_*() routines 2022-08-30 15:32:07 +02:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: vimc: wrong pointer is used with PTR_ERR 2022-07-27 20:24:56 +02:00
tuners media: si2157: unknown chip version Si2147-A30 ROM 0x50 2022-04-09 17:45:49 +02:00
usb media: airspy: fix memory leak in airspy probe 2022-10-21 12:38:40 +02:00
v4l2-core media: v4l2-ioctl.c: fix incorrect error path 2022-09-27 10:24:43 +02:00
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00