video: driver: Initialize handoff_done

If not initialized, power control may wrongly be transferred
to firmware, even though regulator handoff is not done.

Change-Id: Ic76a679ff5f848bfb50c95dc3306f05ee62bc82f
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
This commit is contained in:
Chinmay Sawarkar
2021-02-22 13:14:15 -08:00
parent 6070bc2523
commit c684975c19

View File

@@ -1669,6 +1669,8 @@ static int __disable_regulator(struct regulator_info *rinfo,
goto disable_regulator_failed;
}
core->handoff_done = 0;
if (!regulator_is_enabled(rinfo->regulator))
d_vpr_e("%s: regulator %s already disabled\n",
__func__, rinfo->name);
@@ -2125,7 +2127,6 @@ static int __resume(struct msm_vidc_core *core)
}
__set_subcaches(core);
if (core->handoff_done)
__sys_set_power_control(core, true);
d_vpr_h("Resumed from power collapse\n");
@@ -2646,6 +2647,8 @@ int venus_hfi_core_init(struct msm_vidc_core *core)
return -ENOMEM;
}
core->handoff_done = 0;
rc = __load_fw(core);
if (rc)
return rc;
@@ -2678,7 +2681,6 @@ int venus_hfi_core_init(struct msm_vidc_core *core)
if (rc)
goto error;
if (core->handoff_done)
__sys_set_power_control(core, true);
d_vpr_h("%s(): successful\n", __func__);