Loading drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c +16 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #define CDBG(fmt, args...) pr_debug(fmt, ##args) #define BUF_DEBUG_FULL 0 #define MAX_LIST_COUNT 100 struct msm_isp_bufq *msm_isp_get_bufq( struct msm_isp_buf_mgr *buf_mgr, Loading Loading @@ -402,6 +403,7 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, { int rc = -1; unsigned long flags; unsigned int list_count = 0; struct msm_isp_buffer *temp_buf_info; struct msm_isp_bufq *bufq = NULL; struct vb2_buffer *vb2_buf = NULL; Loading @@ -422,6 +424,7 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, *buf_cnt = 0; spin_lock_irqsave(&bufq->bufq_lock, flags); if (bufq->buf_type == ISP_SHARE_BUF) { list_count = 0; list_for_each_entry(temp_buf_info, &bufq->share_head, share_list) { if (!temp_buf_info->buf_used[id]) { Loading @@ -441,6 +444,19 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, spin_unlock_irqrestore( &bufq->bufq_lock, flags); return rc; } else if (temp_buf_info->buf_used[id] && temp_buf_info->buf_reuse_flag) { spin_unlock_irqrestore( &bufq->bufq_lock, flags); return rc; } list_count++; if (list_count > MAX_LIST_COUNT) { pr_err_ratelimited("%s: %d share_list corruption, list corrupt! count = %d\n", __func__, __LINE__, list_count); spin_unlock_irqrestore( &bufq->bufq_lock, flags); return -EINVAL; } } } Loading Loading @@ -481,7 +497,6 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, bufq->session_id, bufq->stream_id); if (vb2_buf) { if (vb2_buf->v4l2_buf.index < bufq->num_bufs) { list_for_each_entry(buf_pending, &buf_mgr->buffer_q, list) { if (!buf_pending) Loading drivers/media/platform/msm/camera_v2/isp/msm_isp.c +1 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,7 @@ static int vfe_probe(struct platform_device *pdev) &vfe_dev->axi_data; vfe_dev->dual_vfe_res->stats_data[vfe_dev->pdev->id] = &vfe_dev->stats_data; vfe_dev->dual_vfe_res->vfe_dev[vfe_dev->pdev->id] = vfe_dev; rc = vfe_dev->hw_info->vfe_ops.core_ops.get_platform_data(vfe_dev); if (rc < 0) { Loading drivers/media/platform/msm/camera_v2/isp/msm_isp.h +2 −2 Original line number Diff line number Diff line Loading @@ -483,8 +483,7 @@ struct msm_vfe_tasklet_queue_cmd { enum msm_vfe_overflow_state { NO_OVERFLOW, OVERFLOW_DETECTED, HALT_REQUESTED, RESTART_REQUESTED, HALT_ENFORCED, }; struct msm_vfe_error_info { Loading Loading @@ -576,6 +575,7 @@ struct msm_vfe_hw_init_parms { }; struct dual_vfe_resource { struct vfe_device *vfe_dev[MAX_VFE]; void __iomem *vfe_base[MAX_VFE]; uint32_t reg_update_mask[MAX_VFE]; struct msm_vfe_stats_shared_data *stats_data[MAX_VFE]; Loading drivers/media/platform/msm/camera_v2/isp/msm_isp40.c +3 −0 Original line number Diff line number Diff line Loading @@ -1680,6 +1680,9 @@ static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); rc = wait_for_completion_interruptible_timeout( &vfe_dev->halt_complete, msecs_to_jiffies(500)); if (rc <= 0) pr_err("%s:VFE%d halt timeout rc=%d\n", __func__, vfe_dev->pdev->id, rc); } else { /* Halt AXI Bus Bridge */ msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); Loading drivers/media/platform/msm/camera_v2/isp/msm_isp44.c +8 −0 Original line number Diff line number Diff line Loading @@ -1399,12 +1399,20 @@ static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, /*push clear cmd*/ msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); if (atomic_read(&vfe_dev->error_info.overflow_state) == OVERFLOW_DETECTED) pr_err_ratelimited("%s: VFE%d halt for recovery, blocking %d\n", __func__, vfe_dev->pdev->id, blocking); if (blocking) { init_completion(&vfe_dev->halt_complete); /* Halt AXI Bus Bridge */ msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); rc = wait_for_completion_timeout( &vfe_dev->halt_complete, msecs_to_jiffies(500)); if (rc <= 0) pr_err("%s:VFE%d halt timeout rc=%d\n", __func__, vfe_dev->pdev->id, rc); } else { /* Halt AXI Bus Bridge */ msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); Loading Loading
drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c +16 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #define CDBG(fmt, args...) pr_debug(fmt, ##args) #define BUF_DEBUG_FULL 0 #define MAX_LIST_COUNT 100 struct msm_isp_bufq *msm_isp_get_bufq( struct msm_isp_buf_mgr *buf_mgr, Loading Loading @@ -402,6 +403,7 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, { int rc = -1; unsigned long flags; unsigned int list_count = 0; struct msm_isp_buffer *temp_buf_info; struct msm_isp_bufq *bufq = NULL; struct vb2_buffer *vb2_buf = NULL; Loading @@ -422,6 +424,7 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, *buf_cnt = 0; spin_lock_irqsave(&bufq->bufq_lock, flags); if (bufq->buf_type == ISP_SHARE_BUF) { list_count = 0; list_for_each_entry(temp_buf_info, &bufq->share_head, share_list) { if (!temp_buf_info->buf_used[id]) { Loading @@ -441,6 +444,19 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, spin_unlock_irqrestore( &bufq->bufq_lock, flags); return rc; } else if (temp_buf_info->buf_used[id] && temp_buf_info->buf_reuse_flag) { spin_unlock_irqrestore( &bufq->bufq_lock, flags); return rc; } list_count++; if (list_count > MAX_LIST_COUNT) { pr_err_ratelimited("%s: %d share_list corruption, list corrupt! count = %d\n", __func__, __LINE__, list_count); spin_unlock_irqrestore( &bufq->bufq_lock, flags); return -EINVAL; } } } Loading Loading @@ -481,7 +497,6 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, bufq->session_id, bufq->stream_id); if (vb2_buf) { if (vb2_buf->v4l2_buf.index < bufq->num_bufs) { list_for_each_entry(buf_pending, &buf_mgr->buffer_q, list) { if (!buf_pending) Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp.c +1 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,7 @@ static int vfe_probe(struct platform_device *pdev) &vfe_dev->axi_data; vfe_dev->dual_vfe_res->stats_data[vfe_dev->pdev->id] = &vfe_dev->stats_data; vfe_dev->dual_vfe_res->vfe_dev[vfe_dev->pdev->id] = vfe_dev; rc = vfe_dev->hw_info->vfe_ops.core_ops.get_platform_data(vfe_dev); if (rc < 0) { Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp.h +2 −2 Original line number Diff line number Diff line Loading @@ -483,8 +483,7 @@ struct msm_vfe_tasklet_queue_cmd { enum msm_vfe_overflow_state { NO_OVERFLOW, OVERFLOW_DETECTED, HALT_REQUESTED, RESTART_REQUESTED, HALT_ENFORCED, }; struct msm_vfe_error_info { Loading Loading @@ -576,6 +575,7 @@ struct msm_vfe_hw_init_parms { }; struct dual_vfe_resource { struct vfe_device *vfe_dev[MAX_VFE]; void __iomem *vfe_base[MAX_VFE]; uint32_t reg_update_mask[MAX_VFE]; struct msm_vfe_stats_shared_data *stats_data[MAX_VFE]; Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp40.c +3 −0 Original line number Diff line number Diff line Loading @@ -1680,6 +1680,9 @@ static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); rc = wait_for_completion_interruptible_timeout( &vfe_dev->halt_complete, msecs_to_jiffies(500)); if (rc <= 0) pr_err("%s:VFE%d halt timeout rc=%d\n", __func__, vfe_dev->pdev->id, rc); } else { /* Halt AXI Bus Bridge */ msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp44.c +8 −0 Original line number Diff line number Diff line Loading @@ -1399,12 +1399,20 @@ static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, /*push clear cmd*/ msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); if (atomic_read(&vfe_dev->error_info.overflow_state) == OVERFLOW_DETECTED) pr_err_ratelimited("%s: VFE%d halt for recovery, blocking %d\n", __func__, vfe_dev->pdev->id, blocking); if (blocking) { init_completion(&vfe_dev->halt_complete); /* Halt AXI Bus Bridge */ msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); rc = wait_for_completion_timeout( &vfe_dev->halt_complete, msecs_to_jiffies(500)); if (rc <= 0) pr_err("%s:VFE%d halt timeout rc=%d\n", __func__, vfe_dev->pdev->id, rc); } else { /* Halt AXI Bus Bridge */ msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x2C0); Loading