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

Commit e7621080 authored by Senthil Kumar Rajagopal's avatar Senthil Kumar Rajagopal Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: enable/disable hvx only if the state changed



Save the previous satates of HVX . enable or disable
hvx only if the previous state is different from current state.

Change-Id: I24081d1fccff17a0da26ff213df056c7a1cb6388
Signed-off-by: default avatarSenthil Kumar Rajagopal <skrajago@codeaurora.org>
parent 10a55a58
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -792,6 +792,7 @@ struct vfe_device {
	struct msm_vfe_error_info error_info;
	struct msm_vfe_fetch_engine_info fetch_engine_info;
	enum msm_vfe_hvx_streaming_cmd hvx_cmd;
	uint8_t cur_hvx_state;

	/* State variables */
	uint32_t vfe_hw_version;
+5 −0
Original line number Diff line number Diff line
@@ -1494,6 +1494,10 @@ void msm_vfe47_configure_hvx(struct vfe_device *vfe_dev,
	uint32_t val;
	int rc = 0;

	if (is_stream_on == vfe_dev->cur_hvx_state) {
		ISP_DBG("already in same hvx state\n");
		return;
	}
	if (vfe_dev->buf_mgr->secure_enable == SECURE_MODE) {
		pr_err("%s: Cannot configure hvx, secure_mode: %d\n",
			__func__,
@@ -1527,6 +1531,7 @@ void msm_vfe47_configure_hvx(struct vfe_device *vfe_dev,
		val &= 0xFFFFFFF7;
		msm_camera_io_w_mb(val, vfe_dev->vfe_base + 0x50);
	}
	vfe_dev->cur_hvx_state = is_stream_on;
}

void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev,