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

Commit 945f45ef authored by Anil Kumar Kanakanti's avatar Anil Kumar Kanakanti
Browse files

msm: camera: cci: Fixed CCI Read timeout issue



Concurrent CCI read operation could lead to corrupting
rd_done variable, so protecting it using queue specific
synchronization variable.

CRs-Fixed: 2746692
Change-Id: I3ef2188d54196a6eb3f2729b558f263bd04a3c07
Signed-off-by: default avatarAnil Kumar Kanakanti <akanakan@codeaurora.org>
parent c96c341d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1590,8 +1590,10 @@ static int32_t cam_cci_read_bytes(struct v4l2_subdev *sd,
	 * THRESHOLD irq's, we reinit the threshold wait before
	 * THRESHOLD irq's, we reinit the threshold wait before
	 * we load the burst read cmd.
	 * we load the burst read cmd.
	 */
	 */
	mutex_lock(&cci_dev->cci_master_info[master].mutex_q[QUEUE_1]);
	reinit_completion(&cci_dev->cci_master_info[master].rd_done);
	reinit_completion(&cci_dev->cci_master_info[master].rd_done);
	reinit_completion(&cci_dev->cci_master_info[master].th_complete);
	reinit_completion(&cci_dev->cci_master_info[master].th_complete);
	mutex_unlock(&cci_dev->cci_master_info[master].mutex_q[QUEUE_1]);


	CAM_DBG(CAM_CCI, "Bytes to read %u", read_bytes);
	CAM_DBG(CAM_CCI, "Bytes to read %u", read_bytes);
	do {
	do {