msm: camera: isp: Fix stats recovery
Stats buffer done was not coming after device reset because the sequence for turning on stats was not right. Follow the same sequence which is followed on start stream for stats during recovery. Also, for vfe 46 version fix the write master offset. CRs-Fixed: 1089758 Change-Id: I47849097022817dc411c31e3aadf037f6cae9a72 Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
This commit is contained in:
parent
02977df8b2
commit
2f6c60ca4f
5 changed files with 21 additions and 15 deletions
|
@ -754,7 +754,7 @@ static long msm_vfe40_reset_hardware(struct vfe_device *vfe_dev,
|
|||
msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34);
|
||||
msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24);
|
||||
vfe_dev->hw_info->vfe_ops.axi_ops.
|
||||
reload_wm(vfe_dev, vfe_dev->vfe_base, 0x0001FFFF);
|
||||
reload_wm(vfe_dev, vfe_dev->vfe_base, 0x0003FFFF);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ static long msm_vfe44_reset_hardware(struct vfe_device *vfe_dev,
|
|||
msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34);
|
||||
msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24);
|
||||
vfe_dev->hw_info->vfe_ops.axi_ops.
|
||||
reload_wm(vfe_dev, vfe_dev->vfe_base, 0x0001FFFF);
|
||||
reload_wm(vfe_dev, vfe_dev->vfe_base, 0x0031FFFF);
|
||||
}
|
||||
|
||||
if (blocking_call) {
|
||||
|
|
|
@ -90,7 +90,7 @@ static uint8_t stats_pingpong_offset_map[] = {
|
|||
|
||||
uint32_t msm_vfe46_ub_reg_offset(struct vfe_device *vfe_dev, int wm_idx)
|
||||
{
|
||||
return (VFE46_WM_BASE(wm_idx) + 0x18);
|
||||
return (VFE46_WM_BASE(wm_idx) + 0x10);
|
||||
}
|
||||
|
||||
uint32_t msm_vfe46_get_ub_size(struct vfe_device *vfe_dev)
|
||||
|
@ -526,7 +526,7 @@ static long msm_vfe46_reset_hardware(struct vfe_device *vfe_dev,
|
|||
msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68);
|
||||
msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58);
|
||||
vfe_dev->hw_info->vfe_ops.axi_ops.
|
||||
reload_wm(vfe_dev, vfe_dev->vfe_base, 0x0001FFFF);
|
||||
reload_wm(vfe_dev, vfe_dev->vfe_base, 0x0031FFFF);
|
||||
}
|
||||
|
||||
if (blocking_call) {
|
||||
|
|
|
@ -755,7 +755,7 @@ long msm_vfe47_reset_hardware(struct vfe_device *vfe_dev,
|
|||
msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68);
|
||||
msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58);
|
||||
vfe_dev->hw_info->vfe_ops.axi_ops.
|
||||
reload_wm(vfe_dev, vfe_dev->vfe_base, 0x0001FFFF);
|
||||
reload_wm(vfe_dev, vfe_dev->vfe_base, 0x0031FFFF);
|
||||
}
|
||||
|
||||
if (blocking_call) {
|
||||
|
|
|
@ -848,7 +848,6 @@ int msm_isp_stats_reset(struct vfe_device *vfe_dev)
|
|||
struct msm_vfe_stats_stream *stream_info = NULL;
|
||||
struct msm_isp_timestamp timestamp;
|
||||
unsigned long flags;
|
||||
int k;
|
||||
|
||||
msm_isp_get_timestamp(×tamp, vfe_dev);
|
||||
|
||||
|
@ -877,15 +876,6 @@ int msm_isp_stats_reset(struct vfe_device *vfe_dev)
|
|||
ISP_EVENT_BUF_FATAL_ERROR);
|
||||
return rc;
|
||||
}
|
||||
for (k = 0; k < stream_info->num_isp; k++) {
|
||||
struct vfe_device *temp_vfe_dev =
|
||||
stream_info->vfe_dev[k];
|
||||
temp_vfe_dev->hw_info->vfe_ops.stats_ops.
|
||||
cfg_wm_irq_mask(
|
||||
temp_vfe_dev, stream_info);
|
||||
temp_vfe_dev->hw_info->vfe_ops.stats_ops.enable_module(
|
||||
temp_vfe_dev, BIT(i), 1);
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
@ -912,6 +902,22 @@ int msm_isp_stats_restart(struct vfe_device *vfe_dev)
|
|||
stream_info->composite_irq[j] = 0;
|
||||
msm_isp_init_stats_ping_pong_reg(
|
||||
stream_info);
|
||||
for (j = 0; j < stream_info->num_isp; j++) {
|
||||
struct vfe_device *temp_vfe_dev =
|
||||
stream_info->vfe_dev[j];
|
||||
uint8_t comp_flag = stream_info->composite_flag;
|
||||
|
||||
temp_vfe_dev->hw_info->vfe_ops.stats_ops.enable_module(
|
||||
temp_vfe_dev, BIT(i), 1);
|
||||
if (comp_flag)
|
||||
temp_vfe_dev->hw_info->vfe_ops.stats_ops.
|
||||
cfg_comp_mask(temp_vfe_dev, BIT(i),
|
||||
(comp_flag - 1), 1);
|
||||
else
|
||||
temp_vfe_dev->hw_info->vfe_ops.stats_ops.
|
||||
cfg_wm_irq_mask(
|
||||
temp_vfe_dev, stream_info);
|
||||
}
|
||||
spin_unlock_irqrestore(&stream_info->lock, flags);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue