Loading drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c +27 −3 Original line number Diff line number Diff line Loading @@ -194,10 +194,21 @@ static void msm_csid_set_debug_reg(struct csid_device *csid_dev, struct msm_camera_csid_params *csid_params) {} #endif static void msm_csid_set_sof_freeze_debug_reg(struct csid_device *csid_dev) static void msm_csid_set_sof_freeze_debug_reg( struct csid_device *csid_dev, uint8_t irq_enable) { uint32_t val = 0; if (!irq_enable) { val = msm_camera_io_r(csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); msm_camera_io_w(val, csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); msm_camera_io_w(0, csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_mask_addr); return; } if (csid_dev->csid_3p_enabled == 1) { val = ((1 << csid_dev->current_csid_params.lane_cnt) - 1) << csid_dev->ctrl_reg-> Loading Loading @@ -446,6 +457,16 @@ static irqreturn_t msm_csid_irq(int irq_num, void *data) pr_err("%s:%d csid_dev NULL\n", __func__, __LINE__); return IRQ_HANDLED; } if (csid_dev->csid_sof_debug == SOF_DEBUG_ENABLE) { if (csid_dev->csid_sof_debug_count < CSID_SOF_DEBUG_COUNT) csid_dev->csid_sof_debug_count++; else { msm_csid_set_sof_freeze_debug_reg(csid_dev, false); return IRQ_HANDLED; } } irq = msm_camera_io_r(csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); pr_err_ratelimited("%s CSID%d_IRQ_STATUS_ADDR = 0x%x\n", Loading Loading @@ -480,6 +501,7 @@ static int msm_csid_init(struct csid_device *csid_dev, uint32_t *csid_version) return rc; } csid_dev->csid_sof_debug_count = 0; csid_dev->reg_ptr = NULL; if (csid_dev->csid_state == CSID_POWER_UP) { Loading Loading @@ -760,13 +782,14 @@ static long msm_csid_subdev_ioctl(struct v4l2_subdev *sd, break; if (csid_dev->csid_sof_debug == SOF_DEBUG_DISABLE) { csid_dev->csid_sof_debug = SOF_DEBUG_ENABLE; msm_csid_set_sof_freeze_debug_reg(csid_dev); msm_csid_set_sof_freeze_debug_reg(csid_dev, true); } break; case MSM_SD_UNNOTIFY_FREEZE: if (csid_dev->csid_state != CSID_POWER_UP) break; csid_dev->csid_sof_debug = SOF_DEBUG_DISABLE; msm_csid_set_sof_freeze_debug_reg(csid_dev, false); break; case VIDIOC_MSM_CSID_RELEASE: case MSM_SD_SHUTDOWN: Loading Loading @@ -916,13 +939,14 @@ static long msm_csid_subdev_ioctl32(struct v4l2_subdev *sd, break; if (csid_dev->csid_sof_debug == SOF_DEBUG_DISABLE) { csid_dev->csid_sof_debug = SOF_DEBUG_ENABLE; msm_csid_set_sof_freeze_debug_reg(csid_dev); msm_csid_set_sof_freeze_debug_reg(csid_dev, true); } break; case MSM_SD_UNNOTIFY_FREEZE: if (csid_dev->csid_state != CSID_POWER_UP) break; csid_dev->csid_sof_debug = SOF_DEBUG_DISABLE; msm_csid_set_sof_freeze_debug_reg(csid_dev, false); break; case VIDIOC_MSM_CSID_RELEASE: case MSM_SD_SHUTDOWN: Loading drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.h +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ #include "msm_sd.h" #include "cam_soc_api.h" #define CSID_SOF_DEBUG_COUNT 3 enum csiphy_lane_assign { PHY_LANE_D0, PHY_LANE_CLK, Loading Loading @@ -112,6 +114,7 @@ struct csid_device { struct msm_camera_csid_params current_csid_params; uint32_t csid_sof_debug; uint32_t csid_lane_cnt; uint32_t csid_sof_debug_count; }; #define VIDIOC_MSM_CSID_RELEASE \ Loading Loading
drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.c +27 −3 Original line number Diff line number Diff line Loading @@ -194,10 +194,21 @@ static void msm_csid_set_debug_reg(struct csid_device *csid_dev, struct msm_camera_csid_params *csid_params) {} #endif static void msm_csid_set_sof_freeze_debug_reg(struct csid_device *csid_dev) static void msm_csid_set_sof_freeze_debug_reg( struct csid_device *csid_dev, uint8_t irq_enable) { uint32_t val = 0; if (!irq_enable) { val = msm_camera_io_r(csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); msm_camera_io_w(val, csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_clear_cmd_addr); msm_camera_io_w(0, csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_mask_addr); return; } if (csid_dev->csid_3p_enabled == 1) { val = ((1 << csid_dev->current_csid_params.lane_cnt) - 1) << csid_dev->ctrl_reg-> Loading Loading @@ -446,6 +457,16 @@ static irqreturn_t msm_csid_irq(int irq_num, void *data) pr_err("%s:%d csid_dev NULL\n", __func__, __LINE__); return IRQ_HANDLED; } if (csid_dev->csid_sof_debug == SOF_DEBUG_ENABLE) { if (csid_dev->csid_sof_debug_count < CSID_SOF_DEBUG_COUNT) csid_dev->csid_sof_debug_count++; else { msm_csid_set_sof_freeze_debug_reg(csid_dev, false); return IRQ_HANDLED; } } irq = msm_camera_io_r(csid_dev->base + csid_dev->ctrl_reg->csid_reg.csid_irq_status_addr); pr_err_ratelimited("%s CSID%d_IRQ_STATUS_ADDR = 0x%x\n", Loading Loading @@ -480,6 +501,7 @@ static int msm_csid_init(struct csid_device *csid_dev, uint32_t *csid_version) return rc; } csid_dev->csid_sof_debug_count = 0; csid_dev->reg_ptr = NULL; if (csid_dev->csid_state == CSID_POWER_UP) { Loading Loading @@ -760,13 +782,14 @@ static long msm_csid_subdev_ioctl(struct v4l2_subdev *sd, break; if (csid_dev->csid_sof_debug == SOF_DEBUG_DISABLE) { csid_dev->csid_sof_debug = SOF_DEBUG_ENABLE; msm_csid_set_sof_freeze_debug_reg(csid_dev); msm_csid_set_sof_freeze_debug_reg(csid_dev, true); } break; case MSM_SD_UNNOTIFY_FREEZE: if (csid_dev->csid_state != CSID_POWER_UP) break; csid_dev->csid_sof_debug = SOF_DEBUG_DISABLE; msm_csid_set_sof_freeze_debug_reg(csid_dev, false); break; case VIDIOC_MSM_CSID_RELEASE: case MSM_SD_SHUTDOWN: Loading Loading @@ -916,13 +939,14 @@ static long msm_csid_subdev_ioctl32(struct v4l2_subdev *sd, break; if (csid_dev->csid_sof_debug == SOF_DEBUG_DISABLE) { csid_dev->csid_sof_debug = SOF_DEBUG_ENABLE; msm_csid_set_sof_freeze_debug_reg(csid_dev); msm_csid_set_sof_freeze_debug_reg(csid_dev, true); } break; case MSM_SD_UNNOTIFY_FREEZE: if (csid_dev->csid_state != CSID_POWER_UP) break; csid_dev->csid_sof_debug = SOF_DEBUG_DISABLE; msm_csid_set_sof_freeze_debug_reg(csid_dev, false); break; case VIDIOC_MSM_CSID_RELEASE: case MSM_SD_SHUTDOWN: Loading
drivers/media/platform/msm/camera_v2/sensor/csid/msm_csid.h +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ #include "msm_sd.h" #include "cam_soc_api.h" #define CSID_SOF_DEBUG_COUNT 3 enum csiphy_lane_assign { PHY_LANE_D0, PHY_LANE_CLK, Loading Loading @@ -112,6 +114,7 @@ struct csid_device { struct msm_camera_csid_params current_csid_params; uint32_t csid_sof_debug; uint32_t csid_lane_cnt; uint32_t csid_sof_debug_count; }; #define VIDIOC_MSM_CSID_RELEASE \ Loading