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: Senthil Kumar Rajagopal <skrajago@codeaurora.org>
This commit is contained in:
parent
10a55a5874
commit
e76210808d
2 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue