linux-stable/drivers/media/platform/mtk-mdp
Mauro Carvalho Chehab d07bb9702c media: mdk-mdp: fix pm_runtime_get_sync() usage count
The pm_runtime_get_sync() internally increments the
dev->power.usage_count without decrementing it, even on errors.
Replace it by the new pm_runtime_resume_and_get(), introduced by:
commit dd8088d5a8 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
in order to properly decrement the usage counter, avoiding
a potential PM usage counter leak.

While here, fix the return contition of mtk_mdp_m2m_start_streaming(),
as it doesn't make any sense to return 0 if the PM runtime failed
to resume.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-10 11:36:33 +02:00
..
Makefile
mtk_mdp_comp.c media: mtk-mdp: Fix a refcounting bug on error in init 2020-08-06 11:27:45 +02:00
mtk_mdp_comp.h media: mtk-mdp: fix kernel-doc warnings 2021-03-22 12:57:26 +01:00
mtk_mdp_core.c media: mtk-mdp: Fix Null pointer dereference when calling list_add 2020-09-26 10:23:48 +02:00
mtk_mdp_core.h media: mtk-mdp: fix kernel-doc warnings 2021-03-22 12:57:26 +01:00
mtk_mdp_ipi.h
mtk_mdp_m2m.c media: mdk-mdp: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:33 +02:00
mtk_mdp_m2m.h
mtk_mdp_regs.c
mtk_mdp_regs.h
mtk_mdp_vpu.c media: mtk-vpu: avoid unaligned access to DTCM buffer. 2020-03-12 16:25:33 +01:00
mtk_mdp_vpu.h