Skip to content

Commit 653c8f5

Browse files
author
Zefa Chen
committed
media: rockchip: vicap fixed hdr err with group mode
Signed-off-by: Zefa Chen <[email protected]> Change-Id: I3720c692dbd480067f65fc6c8800b7085ffa783a
1 parent 016f705 commit 653c8f5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/media/platform/rockchip/cif/capture.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7726,21 +7726,27 @@ unsigned int rkcif_irq_global(struct rkcif_device *cif_dev)
77267726
return intstat_glb;
77277727
}
77287728

7729-
static bool rkcif_check_buffer_prepare(struct rkcif_device *cif_dev)
7729+
static bool rkcif_check_buffer_prepare(struct rkcif_stream *stream)
77307730
{
7731+
struct rkcif_device *cif_dev = stream->cifdev;
77317732
unsigned long flags;
77327733
bool is_update = false;
77337734

77347735
spin_lock_irqsave(&cif_dev->hw_dev->group_lock, flags);
7735-
if (cif_dev->hw_dev->sync_config.update_code & BIT(cif_dev->csi_host_idx)) {
7736+
if (stream->id == 0 &&
7737+
cif_dev->hw_dev->sync_config.update_code & BIT(cif_dev->csi_host_idx)) {
77367738
is_update = true;
77377739
cif_dev->hw_dev->sync_config.update_code &= ~(BIT(cif_dev->csi_host_idx));
77387740
if (!cif_dev->hw_dev->sync_config.update_code &&
77397741
cif_dev->hw_dev->sync_config.update_cache) {
77407742
cif_dev->hw_dev->sync_config.update_code = cif_dev->hw_dev->sync_config.update_cache;
77417743
cif_dev->hw_dev->sync_config.update_cache = 0;
77427744
}
7745+
} else {
7746+
if (cif_dev->rdbk_buf[RDBK_L])
7747+
is_update = true;
77437748
}
7749+
77447750
spin_unlock_irqrestore(&cif_dev->hw_dev->group_lock, flags);
77457751
return is_update;
77467752
}
@@ -7885,7 +7891,7 @@ void rkcif_irq_pingpong_v1(struct rkcif_device *cif_dev)
78857891
if (cif_dev->sync_type == RKCIF_NOSYNC_MODE)
78867892
is_update = true;
78877893
else
7888-
is_update = rkcif_check_buffer_prepare(cif_dev);
7894+
is_update = rkcif_check_buffer_prepare(stream);
78897895
if (is_update)
78907896
rkcif_update_stream(cif_dev, stream, mipi_id);
78917897
if (cif_dev->chip_id == CHIP_RV1106_CIF)

0 commit comments

Comments
 (0)