Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17cba102 authored by Ravikishore Pampana's avatar Ravikishore Pampana
Browse files

msm: camera: isp: Cleanup the hw manager Context variables during release



IFE hardware manager context object variables need to be cleanup during
the hw release. If not cleaned this variables values will be used in
the next session.

Change-Id: Id151c7481ea0f5c5c43d6dce28d412205fb700f3
Signed-off-by: default avatarRavikishore Pampana <rpampana@codeaurora.org>
parent ef9c8d03
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1986,6 +1986,7 @@ static int cam_ife_mgr_release_hw(void *hw_mgr_priv,
	struct cam_hw_release_args       *release_args = release_hw_args;
	struct cam_ife_hw_mgr            *hw_mgr       = hw_mgr_priv;
	struct cam_ife_hw_mgr_ctx        *ctx;
	uint32_t                          i;

	if (!hw_mgr_priv || !release_hw_args) {
		CAM_ERR(CAM_ISP, "Invalid arguments");
@@ -2015,6 +2016,14 @@ static int cam_ife_mgr_release_hw(void *hw_mgr_priv,
	list_del_init(&ctx->list);
	ctx->ctx_in_use = 0;
	ctx->is_rdi_only_context = 0;
	ctx->cdm_handle = 0;
	ctx->cdm_ops = NULL;
	atomic_set(&ctx->overflow_pending, 0);
	for (i = 0; i < CAM_IFE_HW_NUM_MAX; i++) {
		ctx->sof_cnt[i] = 0;
		ctx->eof_cnt[i] = 0;
		ctx->epoch_cnt[i] = 0;
	}
	CAM_DBG(CAM_ISP, "Exit...ctx id:%d",
		ctx->ctx_index);
	cam_ife_hw_mgr_put_ctx(&hw_mgr->free_ctx_list, &ctx);