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

Commit b9a482ba authored by Shankar Ravi's avatar Shankar Ravi Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: csiphy: Reset phy config count in phy release



If there are multiple phy streamOn, streamOff happening
in a session with the phy re-configured at each streamOn,
the phy config count won't be reset properly at release. As
a result, the phy config params won't be reset either and
will persist till the next session/acquire.

This change resets the config count if the acquire count
has already been reset i.e. all devices have been released.

Change-Id: I774e9ce60cedb5e6ebbdc51f923e60630e30fcd4
Signed-off-by: default avatarShankar Ravi <rshankar@codeaurora.org>
parent 63fb0c00
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -894,8 +894,11 @@ int32_t cam_csiphy_core_cfg(void *phy_dev,
		csiphy_dev->config_count--;
		csiphy_dev->acquire_count--;

		if (csiphy_dev->acquire_count == 0)
		if (csiphy_dev->acquire_count == 0) {
			csiphy_dev->csiphy_state = CAM_CSIPHY_INIT;
			/* reset config count */
			csiphy_dev->config_count = 0;
		}

		if (csiphy_dev->config_count == 0) {
			CAM_DBG(CAM_CSIPHY, "reset csiphy_info");