media: rockchip: vicap: rk3588 fix HDR capture bug in line_info or id_code mode

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I5cd12597e5bdebebbe7cd502f7aa7cad6d4887d2
This commit is contained in:
Zefa Chen
2022-03-05 12:48:02 +08:00
committed by Tao Huang
parent 77d904ce5f
commit 93ffc33081

View File

@@ -2372,6 +2372,11 @@ static int rkcif_csi_channel_set_v1(struct rkcif_stream *stream,
channel->id);
if (mbus_type == V4L2_MBUS_CSI2_DPHY ||
mbus_type == V4L2_MBUS_CSI2_CPHY) {
if (stream->cifdev->hdr.esp.mode == HDR_LINE_CNT ||
stream->cifdev->hdr.esp.mode == HDR_ID_CODE)
channel->vc = 0;
val = CSI_ENABLE_CAPTURE | dma_en |
channel->cmd_mode_en << 26 | CSI_ENABLE_CROP_V1 |
channel->vc << 8 | channel->data_type << 10 |
@@ -7305,8 +7310,12 @@ unsigned int rkcif_irq_global(struct rkcif_device *cif_dev)
unsigned int intstat_glb = 0;
intstat_glb = rkcif_read_register(cif_dev, CIF_REG_GLB_INTST);
if (intstat_glb)
if (intstat_glb) {
rkcif_write_register(cif_dev, CIF_REG_GLB_INTST, intstat_glb);
v4l2_dbg(3, rkcif_debug, &cif_dev->v4l2_dev,
"intstat_glb 0x%x\n",
intstat_glb);
}
if (intstat_glb & SCALE_TOISP_AXI0_ERR) {
v4l2_err(&cif_dev->v4l2_dev,
@@ -7321,9 +7330,6 @@ unsigned int rkcif_irq_global(struct rkcif_device *cif_dev)
return 0;
}
rkcif_irq_handle_scale(cif_dev, intstat_glb);
v4l2_dbg(3, rkcif_debug, &cif_dev->v4l2_dev,
"intstat_glb 0x%x\n",
intstat_glb);
return intstat_glb;
}