media: tegra-video: tegra210: ensure PHY is disabled in pg_mode stop path
Subsystems (4)
PATCH 1/1 media: tegra-video: tegra210: ensure PHY is disabled in pg_mode stop path
tegra210_csi_port_start_streaming() enables the CSI PHY regardless of pg_mode, but tegra210_csi_port_stop_streaming() skips disabling the PHY when pg_mode is set due to an early return.
Remove the early return so that the PHY disable path is always executed, ensuring consistent teardown.
--- drivers/staging/media/tegra-video/tegra210.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/media/tegra-video/tegra210.c +1 -3
@@ -1095,11 +1095,9 @@ tegra210_csi_port_stop_streaming(struct tegra_csi_channel *csi_chan, u8 portno) (0xf <<CSI_PP_START_MARKER_FRAME_MAX_OFFSET ) | CSI_PP_DISABLE); -if (csi_chan->pg_mode) { +if (csi_chan->pg_mode)tpg_write (csi, portno,TEGRA_CSI_PATTERN_GENERATOR_CTRL ,PG_DISABLE ); -return ; - }if (csi_chan->numlanes ==4 ) { csi_write(csi, portno, TEGRA_CSI_PHY_CIL_COMMAND,
Signature · 1 line
2.34.1
Quoted 9 lines · Hungyu Lin
tegra210_csi_port_start_streaming()enables the CSI PHY regardless ofpg_mode, buttegra210_csi_port_stop_streaming()skips disabling the PHY whenpg_modeis set due to an early return.Remove the early return so that the PHY disable path is always executed, ensuring consistent teardown.
Signed-off-by Hungyu Lin <[email protected]>---
The obvious complaint is that this patch needs a Fixes tag.
The early return is suspicious but I don't believe you have tested this patch. It would be better to not send untested patches like this, because there is a risk that the author wrote what they did deliberately. This code is six years old now, so the original author has probably moved on to a different project. It's not necessarily that easy to review and test the patch.
On the other hand, if someone from Nvidia wants to Ack this patch then of course we'll merge the v2 of this which has a Fixes tag. Just wait for someone from Nvidia to respond before resending.
regards,
dan carpenter
Hi Dan,
Thanks, I'll wait for feedback from Nvidia before resending.
Best regards,
Hungyu
Quoted 28 lines · Dan Carpenter
Quoted 9 lines · Hungyu Lin
tegra210_csi_port_start_streaming()enables the CSI PHY regardless ofpg_mode, buttegra210_csi_port_stop_streaming()skips disabling the PHY whenpg_modeis set due to an early return.Remove the early return so that the PHY disable path is always executed, ensuring consistent teardown.
Signed-off-by Hungyu Lin <[email protected]>---
The obvious complaint is that this patch needs a Fixes tag.
The early return is suspicious but I don't believe you have tested this patch. It would be better to not send untested patches like this, because there is a risk that the author wrote what they did deliberately. This code is six years old now, so the original author has probably moved on to a different project. It's not necessarily that easy to review and test the patch.
On the other hand, if someone from Nvidia wants to Ack this patch then of course we'll merge the v2 of this which has a Fixes tag. Just wait for someone from Nvidia to respond before resending.
regards,
dan carpenter