video: driver: skip core deinit if deinited already

Do not try to deinitialize core if core was already
in deinited. Also in failed cases skip calling
venus_hfi_core_deinit() from within venus_hfi_core_init()
as the caller will anyway call venus_hfi_core_deinit().

Change-Id: Idda3d989a8eb500b0d5392a1eac65109e3d73b81
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
This commit is contained in:
Maheshwar Ajja
2021-04-06 11:19:08 -07:00
parent d0d96b1076
commit e6e1004dd5

View File

@@ -2823,7 +2823,6 @@ int venus_hfi_core_init(struct msm_vidc_core *core)
error:
d_vpr_h("%s(): failed\n", __func__);
venus_hfi_core_deinit(core);
return rc;
}
@@ -2835,6 +2834,8 @@ int venus_hfi_core_deinit(struct msm_vidc_core *core)
}
d_vpr_h("%s(): core %pK\n", __func__, core);
__strict_check(core);
if (core->state == MSM_VIDC_CORE_DEINIT)
return 0;
__resume(core);
__flush_debug_queue(core, core->packet, core->packet_size);
__disable_subcaches(core);