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

Commit 654f5d15 authored by Lokesh Kumar Aakulu's avatar Lokesh Kumar Aakulu Committed by Gerrit - the friendly Code Review server
Browse files

msm: camerav2: sensor: Avoid csiphy release when used in combo mode



When two camera sensors are running concurrently and sharing csiphy
core dont release csiphy core when one of the sensor is streamoff.
This will cut off the mipi data for other sensor which is already
streaming on same core. Release csiphy core only one sensor is in
use for that instant.

Change-Id: I3fde0d122ce46ac6f95d7d0c1cc65ae9377d8f3d
Signed-off-by: default avatarLokesh Kumar Aakulu <lkumar@codeaurora.org>
Signed-off-by: default avatarVivek Veenam <vveenam@codeaurora.org>
parent 64120cd2
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1122,6 +1122,7 @@ static int32_t msm_csiphy_cmd(struct csiphy_device *csiphy_dev, void *arg)
			break;
		}
		csiphy_dev->csiphy_sof_debug = SOF_DEBUG_DISABLE;
		csiphy_dev->is_combo_mode = csiphy_params.combo_mode;
		rc = msm_csiphy_lane_config(csiphy_dev, &csiphy_params);
		break;
	case CSIPHY_RELEASE:
@@ -1132,7 +1133,14 @@ static int32_t msm_csiphy_cmd(struct csiphy_device *csiphy_dev, void *arg)
			rc = -EFAULT;
			break;
		}
		if ((csiphy_dev->is_combo_mode == 1) &&
			(csiphy_dev->ref_count == 2)) {
			/*CSIPHY is running in Combo mode do
			not power down core*/
			csiphy_dev->ref_count--;
		} else {
			rc = msm_csiphy_release(csiphy_dev, &csi_lane_params);
		}
		break;
	default:
		pr_err("%s: %d failed\n", __func__, __LINE__);
+1 −0
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ struct csiphy_device {
	uint8_t num_irq_registers;
	uint32_t csiphy_sof_debug;
	uint32_t csiphy_sof_debug_count;
	uint32_t is_combo_mode;
};

#define VIDIOC_MSM_CSIPHY_RELEASE \