From 2cd4abda5acfd4c86d7cb5ef34f87abc77594d91 Mon Sep 17 00:00:00 2001 From: Sreesudhan Ramakrish Ramkumar Date: Mon, 8 Feb 2016 20:15:56 -0800 Subject: [PATCH] msm: camera: isp: Fix HVX streaming after crash If user space process crashed, hvx state is not updated since it is updated during stream off (which never gets called during stream off). When camera is opened after crash, HVX configuration is not reset. This leads to data routed to HVX even if its disabled. Update HVX state during stream ON and configure HVX with enable / disable to fix the issue. Change-Id: I4b9cbba1261eafd83c67275c5d7dc3defbb3d990 Signed-off-by: Sreesudhan Ramakrish Ramkumar Signed-off-by: Shubhraprakash Das --- drivers/media/platform/msm/camera_v2/isp/msm_isp47.c | 2 ++ drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c index 98e73d48ad15..06785edd3b6d 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c @@ -1507,6 +1507,8 @@ void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, if ((vfe_dev->hvx_cmd > HVX_DISABLE) && (vfe_dev->hvx_cmd <= HVX_ROUND_TRIP)) msm_vfe47_configure_hvx(vfe_dev, 1); + else + msm_vfe47_configure_hvx(vfe_dev, 0); bus_en = ((vfe_dev->axi_data. diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c index 72eac5d81627..be58cbc55ded 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c @@ -450,9 +450,7 @@ static int msm_isp_cfg_pix(struct vfe_device *vfe_dev, } pix_cfg = &input_cfg->d.pix_cfg; - if ((pix_cfg->hvx_cmd > HVX_DISABLE) && - (pix_cfg->hvx_cmd <= HVX_ROUND_TRIP)) - vfe_dev->hvx_cmd = pix_cfg->hvx_cmd; + vfe_dev->hvx_cmd = pix_cfg->hvx_cmd; vfe_dev->is_split = input_cfg->d.pix_cfg.is_split; vfe_dev->axi_data.src_info[VFE_PIX_0].pixel_clock =