mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
media: i2c: tc35874x: reconfig csi after stop stream
stop stream just close data output, csi phy state maybe not ok for next start stream. so reset and config csi during stop stream. Change-Id: Ic2eea6058249c294a5a4c036c87bf0b655986025 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -402,6 +402,13 @@ static int tc35874x_get_detected_timings(struct v4l2_subdev *sd,
|
||||
bt->height *= 2;
|
||||
bt->il_vsync = bt->vsync + 1;
|
||||
bt->pixelclock /= 2;
|
||||
|
||||
/* frame count number: FS = FE 1,2,1,2... */
|
||||
i2c_wr16(sd, FCCTL, 0x0002);
|
||||
/* packet id for interlace mode only */
|
||||
i2c_wr16(sd, PACKETID1, 0x1e1e);
|
||||
} else {
|
||||
i2c_wr16(sd, FCCTL, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1524,6 +1531,9 @@ static int tc35874x_s_stream(struct v4l2_subdev *sd, int enable)
|
||||
{
|
||||
enable_stream(sd, enable);
|
||||
|
||||
/* stop stream to reset csi*/
|
||||
if (!enable)
|
||||
tc35874x_set_csi(sd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1687,10 +1697,6 @@ static int tc35874x_s_edid(struct v4l2_subdev *sd,
|
||||
|
||||
state->edid_blocks_written = edid->blocks;
|
||||
|
||||
/* frame count number: FS = FE 1,2,1,2... */
|
||||
i2c_wr16(sd, FCCTL, 0x0002);
|
||||
/* packet id for interlace mode only */
|
||||
i2c_wr16(sd, PACKETID1, 0x1e1e);
|
||||
if (tx_5v_power_present(sd))
|
||||
tc35874x_enable_edid(sd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user