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

Commit f2b30f34 authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: reqmgr: Fix trigger count out of bound issue" into camera-kernel.lnx.4.0

parents 40fa38cc c457fcd6
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -42,10 +42,10 @@ void cam_req_mgr_core_link_reset(struct cam_req_mgr_core_link *link)
	link->last_flush_id = 0;
	link->initial_sync_req = -1;
	link->dual_trigger = false;
	link->trigger_cnt[0][0] = 0;
	link->trigger_cnt[0][1] = 0;
	link->trigger_cnt[1][0] = 0;
	link->trigger_cnt[1][1] = 0;
	link->trigger_cnt[0][CAM_TRIGGER_POINT_SOF] = 0;
	link->trigger_cnt[0][CAM_TRIGGER_POINT_EOF] = 0;
	link->trigger_cnt[1][CAM_TRIGGER_POINT_SOF] = 0;
	link->trigger_cnt[1][CAM_TRIGGER_POINT_EOF] = 0;
	link->in_msync_mode = false;
	link->retry_cnt = 0;
	link->is_shutdown = false;
@@ -574,10 +574,10 @@ static void __cam_req_mgr_flush_req_slot(
	atomic_set(&link->eof_event_cnt, 0);
	in_q->wr_idx = 0;
	in_q->rd_idx = 0;
	link->trigger_cnt[0][0] = 0;
	link->trigger_cnt[0][1] = 0;
	link->trigger_cnt[1][0] = 0;
	link->trigger_cnt[1][1] = 0;
	link->trigger_cnt[0][CAM_TRIGGER_POINT_SOF] = 0;
	link->trigger_cnt[0][CAM_TRIGGER_POINT_EOF] = 0;
	link->trigger_cnt[1][CAM_TRIGGER_POINT_SOF] = 0;
	link->trigger_cnt[1][CAM_TRIGGER_POINT_EOF] = 0;
}

/**
@@ -4084,10 +4084,10 @@ int cam_req_mgr_link_v2(struct cam_req_mgr_ver_info *link_info)
		goto setup_failed;
	}

	link->trigger_cnt[0][0] = 0;
	link->trigger_cnt[0][1] = 0;
	link->trigger_cnt[1][0] = 0;
	link->trigger_cnt[1][1] = 0;
	link->trigger_cnt[0][CAM_TRIGGER_POINT_SOF] = 0;
	link->trigger_cnt[0][CAM_TRIGGER_POINT_EOF] = 0;
	link->trigger_cnt[1][CAM_TRIGGER_POINT_SOF] = 0;
	link->trigger_cnt[1][CAM_TRIGGER_POINT_EOF] = 0;

	mutex_unlock(&link->lock);
	mutex_unlock(&g_crm_core_dev->crm_lock);
+2 −1
Original line number Diff line number Diff line
@@ -415,7 +415,8 @@ struct cam_req_mgr_core_link {
	uint64_t                             sof_timestamp;
	uint64_t                             prev_sof_timestamp;
	bool                                 dual_trigger;
	uint32_t trigger_cnt[CAM_REQ_MGR_MAX_TRIGGERS][CAM_TRIGGER_MAX_POINTS];
	uint32_t trigger_cnt[CAM_REQ_MGR_MAX_TRIGGERS]
				[CAM_TRIGGER_MAX_POINTS + 1];
	atomic_t                             eof_event_cnt;
	bool                                 skip_init_frame;
	uint64_t                             last_sof_trigger_jiffies;