mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
media: rockchip: isp: fix fast with vpss for isp35
Change-Id: Ic430e1274e8fb41f922baf1b58f6ac5d36da3dea Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -324,6 +324,7 @@ struct rkisp_device {
|
||||
bool is_frm_rd;
|
||||
bool is_multi_one_sync;
|
||||
bool is_wait_aiq;
|
||||
bool is_wait_aiq_isp_end;
|
||||
bool is_first_frame;
|
||||
|
||||
struct rkisp_vicap_input vicap_in;
|
||||
|
||||
@@ -223,6 +223,10 @@ static void rkisp_params_vb2_buf_queue(struct vb2_buffer *vb)
|
||||
spin_unlock_irqrestore(¶ms_vdev->config_lock, flags);
|
||||
|
||||
if (dev->is_wait_aiq) {
|
||||
if (rkisp_cond_poll_timeout(dev->is_wait_aiq_isp_end, 1000, 50 * USEC_PER_MSEC)) {
|
||||
dev_err(dev->dev, "wait for isp idle timeout\n");
|
||||
return;
|
||||
}
|
||||
dev_info(dev->dev, "sync params for rtt\n");
|
||||
dev->is_wait_aiq = false;
|
||||
dev->skip_frame = 0;
|
||||
@@ -250,11 +254,16 @@ static void rkisp_params_vb2_buf_queue(struct vb2_buffer *vb)
|
||||
vb2_buffer_done(&buf->vb.vb2_buf, VB2_BUF_STATE_DONE);
|
||||
}
|
||||
spin_unlock_irqrestore(¶ms_vdev->config_lock, flags);
|
||||
if (rkisp_cond_poll_timeout(!dev->is_rtt_first, 1000, 50 * USEC_PER_MSEC)) {
|
||||
dev_err(dev->dev, "wait for isp idle timeout\n");
|
||||
return;
|
||||
}
|
||||
dev_info(dev->dev, "params seq:%d for rtt\n", params->frame_id);
|
||||
dev->is_first_double = false;
|
||||
if (dev->isp_ver >= ISP_V33) {
|
||||
dev->skip_frame = 1;
|
||||
dev->is_wait_aiq = true;
|
||||
dev->is_wait_aiq_isp_end = false;
|
||||
}
|
||||
dev->sw_rd_cnt = 0;
|
||||
if (dev->hw_dev->unite == ISP_UNITE_ONE) {
|
||||
|
||||
@@ -60,10 +60,12 @@ static int rkisp_sditf_s_stream(struct v4l2_subdev *sd, int on)
|
||||
ret = dev->pipe.open(&dev->pipe, &isp_sdev->sd.entity, true);
|
||||
if (ret < 0)
|
||||
goto refcnt_dec;
|
||||
ret = dev->pipe.set_stream(&dev->pipe, true);
|
||||
if (ret < 0)
|
||||
goto pipe_close;
|
||||
sditf->is_on = true;
|
||||
ret = dev->pipe.set_stream(&dev->pipe, true);
|
||||
if (ret < 0) {
|
||||
sditf->is_on = false;
|
||||
goto pipe_close;
|
||||
}
|
||||
if (!dev->is_aiisp_sync)
|
||||
dev->irq_ends_mask |= ISP_FRAME_VPSS;
|
||||
goto unlock;
|
||||
@@ -164,6 +166,7 @@ void rkisp_sditf_sof(struct rkisp_device *dev, u32 irq)
|
||||
info.unite_index = dev->unite_index;
|
||||
if (dev->isp_ver == ISP_V35)
|
||||
info.grey = !!(rkisp_read(dev, ISP3X_CNR_CTRL, false) & ISP35_CNR_UV_DIS);
|
||||
info.skip_frame = dev->skip_frame;
|
||||
v4l2_subdev_call(sditf->remote_sd, core, ioctl, RKISP_VPSS_CMD_SOF, &info);
|
||||
|
||||
rkisp_config_frame_info(dev, &frame_info);
|
||||
|
||||
@@ -31,6 +31,7 @@ struct rkisp_vpss_sof {
|
||||
u64 timestamp;
|
||||
u32 unite_index;
|
||||
u32 grey;
|
||||
u32 skip_frame;
|
||||
};
|
||||
|
||||
struct rkisp_vpss_frame_info {
|
||||
|
||||
@@ -1398,8 +1398,10 @@ static void rkisp_frame_end_idle(struct rkisp_device *dev)
|
||||
|
||||
end:
|
||||
if (dev->is_wait_aiq &&
|
||||
(dev->unite_div < ISP_UNITE_DIV2 || dev->unite_index == ISP_UNITE_RIGHT))
|
||||
(dev->unite_div < ISP_UNITE_DIV2 || dev->unite_index == ISP_UNITE_RIGHT)) {
|
||||
dev->is_wait_aiq_isp_end = true;
|
||||
return;
|
||||
}
|
||||
rkisp_config_aiisp(dev);
|
||||
if (dev->hw_dev->is_dvfs)
|
||||
schedule_work(&dev->rdbk_work);
|
||||
|
||||
Reference in New Issue
Block a user