OrangePi_CM5/drivers/media/platform/mtk-vcodec
Mauro Carvalho Chehab 3c90c3fbdc media: mtk-vcodec: fix PM runtime get logic
[ Upstream commit 908711f542c17fe61e5d653da1beb8e5ab5c7b50 ]

Currently, the driver just assumes that PM runtime logic
succeded resuming the device.

That may not be the case, as pm_runtime_get_sync()
can fail (but keeping the usage count incremented).

Replace the code to use pm_runtime_resume_and_get(),
and letting it return the error code.

This way, if mtk_vcodec_dec_pw_on() fails, the logic
under fops_vcodec_open() will do the right thing and
return an error, instead of just assuming that the
device is ready to be used.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-14 16:55:49 +02:00
..
vdec media: mtk-vcodec: fix error return code in vdec_vp9_decode() 2021-03-04 11:37:39 +01:00
venc
…
Makefile
…
mtk_vcodec_dec.c
…
mtk_vcodec_dec.h
…
mtk_vcodec_dec_drv.c media: mtk-vcodec: fix PM runtime get logic 2021-07-14 16:55:49 +02:00
mtk_vcodec_dec_pm.c media: mtk-vcodec: fix PM runtime get logic 2021-07-14 16:55:49 +02:00
mtk_vcodec_dec_pm.h media: mtk-vcodec: fix PM runtime get logic 2021-07-14 16:55:49 +02:00
mtk_vcodec_drv.h
…
mtk_vcodec_enc.c
…
mtk_vcodec_enc.h
…
mtk_vcodec_enc_drv.c media: mtk-vcodec: fix argument used when DEBUG is defined 2021-03-04 11:37:43 +01:00
mtk_vcodec_enc_pm.c media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_enc_pm() 2020-12-30 11:53:11 +01:00
mtk_vcodec_enc_pm.h
…
mtk_vcodec_fw.c
…
mtk_vcodec_fw.h
…
mtk_vcodec_fw_priv.h
…
mtk_vcodec_fw_scp.c
…
mtk_vcodec_fw_vpu.c
…
mtk_vcodec_intr.c
…
mtk_vcodec_intr.h
…
mtk_vcodec_util.c
…
mtk_vcodec_util.h
…
vdec_drv_base.h
…
vdec_drv_if.c
…
vdec_drv_if.h
…
vdec_ipi_msg.h
…
vdec_vpu_if.c
…
vdec_vpu_if.h
…
venc_drv_base.h
…
venc_drv_if.c
…
venc_drv_if.h
…
venc_ipi_msg.h
…
venc_vpu_if.c
…
venc_vpu_if.h
…