linux/drivers/media/platform/mtk-vcodec
Mauro Carvalho Chehab 908711f542 media: mtk-vcodec: fix PM runtime get logic
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>
2021-05-10 11:36:34 +02:00
..
vdec media: fix incorrect kernel doc usages 2021-03-11 11:59:44 +01:00
venc media: mtk-vcodec: Separating mtk encoder driver 2021-04-06 16:06:52 +02:00
Makefile media: mtk-vcodec: fix build breakage when one of VPU or SCP is enabled 2020-11-05 14:32:11 +01:00
mtk_vcodec_dec_drv.c media: mtk-vcodec: fix PM runtime get logic 2021-05-10 11:36:34 +02:00
mtk_vcodec_dec_pm.c media: mtk-vcodec: fix PM runtime get logic 2021-05-10 11:36:34 +02:00
mtk_vcodec_dec_pm.h media: mtk-vcodec: fix PM runtime get logic 2021-05-10 11:36:34 +02:00
mtk_vcodec_dec.c media: mtk-vcodec: Do not zero reserved fields 2021-01-27 13:44:06 +01:00
mtk_vcodec_dec.h media: mtk-vcodec: use v4l2_m2m_buffer where appropriate 2020-01-09 14:46:41 +01:00
mtk_vcodec_drv.h media: mtk-vcodec: Separating mtk encoder driver 2021-04-06 16:06:52 +02:00
mtk_vcodec_enc_drv.c media: mtk-vcodec: Separating mtk encoder driver 2021-04-06 16:06:52 +02:00
mtk_vcodec_enc_pm.c media: mtk-vcodec: Separating mtk encoder driver 2021-04-06 16:06:52 +02:00
mtk_vcodec_enc_pm.h Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
mtk_vcodec_enc.c media: mtk-vcodec: Separating mtk encoder driver 2021-04-06 16:06:52 +02:00
mtk_vcodec_enc.h media: mtk-vcodec: use v4l2_m2m_buffer where appropriate 2020-01-09 14:46:41 +01:00
mtk_vcodec_fw_priv.h media: mtk-vcodec: fix build breakage when one of VPU or SCP is enabled 2020-11-05 14:32:11 +01:00
mtk_vcodec_fw_scp.c media: mtk-vcodec: move firmware implementations into their own files 2020-11-05 14:31:32 +01:00
mtk_vcodec_fw_vpu.c media: mtk-vcodec: move firmware implementations into their own files 2020-11-05 14:31:32 +01:00
mtk_vcodec_fw.c media: mtk-vcodec: move firmware implementations into their own files 2020-11-05 14:31:32 +01:00
mtk_vcodec_fw.h media: mtk-vcodec: move firmware implementations into their own files 2020-11-05 14:31:32 +01:00
mtk_vcodec_intr.c media: mtk-vcodec: Fix order of log arguments 2021-01-27 13:11:25 +01:00
mtk_vcodec_intr.h Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
mtk_vcodec_util.c media: mtk-vcodec: abstract firmware interface 2020-09-26 09:53:52 +02:00
mtk_vcodec_util.h Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
vdec_drv_base.h media: mtk-vcodec: abstract firmware interface 2020-09-26 09:53:52 +02:00
vdec_drv_if.c media: mtk-vcodec: abstract firmware interface 2020-09-26 09:53:52 +02:00
vdec_drv_if.h media: mtk-vcodec: fix kernel-doc warnings 2021-03-22 12:59:16 +01:00
vdec_ipi_msg.h Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
vdec_vpu_if.c media: mtk-vcodec: abstract firmware interface 2020-09-26 09:53:52 +02:00
vdec_vpu_if.h media: mtk-vcodec: abstract firmware interface 2020-09-26 09:53:52 +02:00
venc_drv_base.h media: mtk-vcodec: avoid unneeded pointer-to-long conversions 2019-06-21 17:09:30 -04:00
venc_drv_if.c media: mtk-vcodec: abstract firmware interface 2020-09-26 09:53:52 +02:00
venc_drv_if.h media: mtk-vcodec: venc: support SCP firmware 2020-09-26 10:03:39 +02:00
venc_ipi_msg.h media: mtk-vcodec: fix kernel-doc warnings 2021-03-22 12:59:16 +01:00
venc_vpu_if.c media: mtk-vcodec: venc: handle firmware version field 2020-09-26 10:04:39 +02:00
venc_vpu_if.h media: mtk-vcodec: venc: support SCP firmware 2020-09-26 10:03:39 +02:00