msm: camera: isp: Add drop reporting in RESUMING state
In RESUMING state, WM is stopped causing skip in diverted buffers. Add drop reporting for these frames, so that modules down stream can be notified in case of reg_update miss. CRs-Fixed: 1012335 Change-Id: I67d700c5c844fd6be3bf6ded756fb93e0ebfb537 Signed-off-by: Harsh Shah <harshs@codeaurora.org> Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
This commit is contained in:
parent
716216089b
commit
149dce7c6c
2 changed files with 47 additions and 11 deletions
|
@ -631,6 +631,7 @@ void msm_isp_check_for_output_error(struct vfe_device *vfe_dev,
|
||||||
struct msm_vfe_axi_stream *stream_info;
|
struct msm_vfe_axi_stream *stream_info;
|
||||||
struct msm_vfe_axi_shared_data *axi_data;
|
struct msm_vfe_axi_shared_data *axi_data;
|
||||||
int i;
|
int i;
|
||||||
|
uint32_t stream_idx;
|
||||||
|
|
||||||
if (!vfe_dev || !sof_info) {
|
if (!vfe_dev || !sof_info) {
|
||||||
pr_err("%s %d failed: vfe_dev %pK sof_info %pK\n", __func__,
|
pr_err("%s %d failed: vfe_dev %pK sof_info %pK\n", __func__,
|
||||||
|
@ -648,14 +649,28 @@ void msm_isp_check_for_output_error(struct vfe_device *vfe_dev,
|
||||||
if (!vfe_dev->reg_updated) {
|
if (!vfe_dev->reg_updated) {
|
||||||
sof_info->regs_not_updated =
|
sof_info->regs_not_updated =
|
||||||
vfe_dev->reg_update_requested;
|
vfe_dev->reg_update_requested;
|
||||||
|
}
|
||||||
for (i = 0; i < VFE_AXI_SRC_MAX; i++) {
|
for (i = 0; i < VFE_AXI_SRC_MAX; i++) {
|
||||||
struct msm_vfe_axi_stream *temp_stream_info;
|
struct msm_vfe_axi_stream *temp_stream_info;
|
||||||
|
|
||||||
stream_info = &axi_data->stream_info[i];
|
stream_info = &axi_data->stream_info[i];
|
||||||
if (stream_info->state != ACTIVE ||
|
stream_idx = HANDLE_TO_IDX(stream_info->stream_handle);
|
||||||
!stream_info->controllable_output ||
|
|
||||||
(SRC_TO_INTF(stream_info->stream_src) !=
|
/*
|
||||||
VFE_PIX_0))
|
* Process drop only if controllable ACTIVE PIX stream &&
|
||||||
|
* reg_not_updated
|
||||||
|
* OR stream is in RESUMING state.
|
||||||
|
* Other cases there is no drop to report, so continue.
|
||||||
|
*/
|
||||||
|
if (!((stream_info->state == ACTIVE &&
|
||||||
|
stream_info->controllable_output &&
|
||||||
|
(SRC_TO_INTF(stream_info->stream_src) ==
|
||||||
|
VFE_PIX_0)) ||
|
||||||
|
stream_info->state == RESUMING))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (stream_info->controllable_output &&
|
||||||
|
!vfe_dev->reg_updated) {
|
||||||
temp_stream_info =
|
temp_stream_info =
|
||||||
msm_isp_get_controllable_stream(vfe_dev,
|
msm_isp_get_controllable_stream(vfe_dev,
|
||||||
stream_info);
|
stream_info);
|
||||||
|
@ -666,7 +681,18 @@ void msm_isp_check_for_output_error(struct vfe_device *vfe_dev,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stream_info->state == RESUMING &&
|
||||||
|
!stream_info->controllable_output) {
|
||||||
|
ISP_DBG("%s: axi_updating_mask stream_id %x frame_id %d\n",
|
||||||
|
__func__, stream_idx, vfe_dev->axi_data.
|
||||||
|
src_info[SRC_TO_INTF(stream_info->stream_src)]
|
||||||
|
.frame_id);
|
||||||
|
sof_info->axi_updating_mask |=
|
||||||
|
1 << stream_idx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
vfe_dev->reg_updated = 0;
|
vfe_dev->reg_updated = 0;
|
||||||
|
|
||||||
/* report frame drop per stream */
|
/* report frame drop per stream */
|
||||||
|
@ -1875,8 +1901,8 @@ int msm_isp_drop_frame(struct vfe_device *vfe_dev,
|
||||||
__func__, done_buf->bufq_handle);
|
__func__, done_buf->bufq_handle);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
sof_info->reg_update_fail_mask |=
|
sof_info->reg_update_fail_mask_ext |=
|
||||||
1 << (bufq->bufq_handle & 0xF);
|
(bufq->bufq_handle & 0xFF);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&stream_info->lock, flags);
|
spin_unlock_irqrestore(&stream_info->lock, flags);
|
||||||
|
|
||||||
|
|
|
@ -719,7 +719,7 @@ struct msm_isp_output_info {
|
||||||
/* This structure is piggybacked with SOF event */
|
/* This structure is piggybacked with SOF event */
|
||||||
struct msm_isp_sof_info {
|
struct msm_isp_sof_info {
|
||||||
uint8_t regs_not_updated;
|
uint8_t regs_not_updated;
|
||||||
/* mask with AXI_SRC for regs not updated */
|
/* mask with bufq_handle for regs not updated */
|
||||||
uint16_t reg_update_fail_mask;
|
uint16_t reg_update_fail_mask;
|
||||||
/* mask with bufq_handle for get_buf failed */
|
/* mask with bufq_handle for get_buf failed */
|
||||||
uint32_t stream_get_buf_fail_mask;
|
uint32_t stream_get_buf_fail_mask;
|
||||||
|
@ -727,7 +727,17 @@ struct msm_isp_sof_info {
|
||||||
uint16_t stats_get_buf_fail_mask;
|
uint16_t stats_get_buf_fail_mask;
|
||||||
/* delta between master and slave */
|
/* delta between master and slave */
|
||||||
struct msm_isp_ms_delta_info ms_delta_info;
|
struct msm_isp_ms_delta_info ms_delta_info;
|
||||||
|
/*
|
||||||
|
* mask with AXI_SRC in paused state. In PAUSED
|
||||||
|
* state there is no Buffer output. So this mask is used
|
||||||
|
* to report drop.
|
||||||
|
*/
|
||||||
|
uint16_t axi_updating_mask;
|
||||||
|
/* extended mask with bufq_handle for regs not updated */
|
||||||
|
uint32_t reg_update_fail_mask_ext;
|
||||||
};
|
};
|
||||||
|
#define AXI_UPDATING_MASK 1
|
||||||
|
#define REG_UPDATE_FAIL_MASK_EXT 1
|
||||||
|
|
||||||
struct msm_isp_event_data {
|
struct msm_isp_event_data {
|
||||||
/*Wall clock except for buffer divert events
|
/*Wall clock except for buffer divert events
|
||||||
|
|
Loading…
Add table
Reference in a new issue