public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] media: tegra-video: tegra210: ensure PHY is disabled in pg_mode stop path
@ 2026-04-12 16:36 Hungyu Lin
  2026-04-13  8:03 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Hungyu Lin @ 2026-04-12 16:36 UTC (permalink / raw)
  To: thierry.reding, jonathanh, skomatineni, luca.ceresoli
  Cc: mchehab, gregkh, linux-media, linux-tegra, linux-staging,
	linux-kernel, Hungyu Lin

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.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
 drivers/staging/media/tegra-video/tegra210.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/media/tegra-video/tegra210.c b/drivers/staging/media/tegra-video/tegra210.c
index da99f19a39e7..57b5da11da93 100644
--- a/drivers/staging/media/tegra-video/tegra210.c
+++ b/drivers/staging/media/tegra-video/tegra210.c
@@ -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,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: tegra-video: tegra210: ensure PHY is disabled in pg_mode stop path
  2026-04-12 16:36 [PATCH] media: tegra-video: tegra210: ensure PHY is disabled in pg_mode stop path Hungyu Lin
@ 2026-04-13  8:03 ` Dan Carpenter
  2026-04-13  8:33   ` Denny Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2026-04-13  8:03 UTC (permalink / raw)
  To: Hungyu Lin
  Cc: thierry.reding, jonathanh, skomatineni, luca.ceresoli, mchehab,
	gregkh, linux-media, linux-tegra, linux-staging, linux-kernel

On Sun, Apr 12, 2026 at 04:36:00PM +0000, Hungyu Lin wrote:
> 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.
> 
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: tegra-video: tegra210: ensure PHY is disabled in pg_mode stop path
  2026-04-13  8:03 ` Dan Carpenter
@ 2026-04-13  8:33   ` Denny Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Denny Lin @ 2026-04-13  8:33 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: thierry.reding, jonathanh, skomatineni, luca.ceresoli, mchehab,
	gregkh, linux-media, linux-tegra, linux-staging, linux-kernel

Hi Dan,

Thanks, I'll wait for feedback from Nvidia before resending.

Best regards,
Hungyu

On Mon, Apr 13, 2026 at 1:03 AM Dan Carpenter <error27@gmail.com> wrote:
>
> On Sun, Apr 12, 2026 at 04:36:00PM +0000, Hungyu Lin wrote:
> > 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.
> >
> > Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> > ---
>
> 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-13  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-12 16:36 [PATCH] media: tegra-video: tegra210: ensure PHY is disabled in pg_mode stop path Hungyu Lin
2026-04-13  8:03 ` Dan Carpenter
2026-04-13  8:33   ` Denny Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox