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

Commit c88461f0 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram Committed by Vishalsingh Hajeri
Browse files

msm: camera: Memset the data structure



This change memsets the flush arguments struct before
populating the necessary fields. Also as part of icp flush
removing log that accesses pending req even when the pending
req count might be 0.

Change-Id: I16f9b1c1bfa6f863a32d305e163b10883e78b212
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
Signed-off-by: default avatarVishalsingh Hajeri <vhajeri@codeaurora.org>
parent b000f36a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -504,6 +504,7 @@ int32_t cam_context_flush_ctx_to_hw(struct cam_context *ctx)
	bool free_req;

	CAM_DBG(CAM_CTXT, "[%s] E: NRT flush ctx", ctx->dev_name);
	memset(&flush_args, 0, sizeof(flush_args));

	/*
	 * flush pending requests, take the sync lock to synchronize with the
@@ -670,6 +671,7 @@ int32_t cam_context_flush_req_to_hw(struct cam_context *ctx,

	CAM_DBG(CAM_CTXT, "[%s] E: NRT flush req", ctx->dev_name);

	memset(&flush_args, 0, sizeof(flush_args));
	flush_args.num_req_pending = 0;
	flush_args.num_req_active = 0;
	mutex_lock(&ctx->sync_mutex);
+2 −4
Original line number Diff line number Diff line
@@ -3841,10 +3841,8 @@ static int cam_icp_mgr_hw_flush(void *hw_priv, void *hw_flush_args)
		return -EINVAL;
	}

	CAM_DBG(CAM_REQ, "ctx_id %d req %lld Flush type %d",
		ctx_data->ctx_id,
		*(int64_t *)flush_args->flush_req_pending[0],
		flush_args->flush_type);
	CAM_DBG(CAM_REQ, "ctx_id %d Flush type %d",
		ctx_data->ctx_id, flush_args->flush_type);

	switch (flush_args->flush_type) {
	case CAM_FLUSH_TYPE_ALL: