linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] TDA1997x: report -ENOLINK after disconnecting HDMI source
@ 2021-07-26 10:49 Krzysztof Hałasa
  2021-08-19 19:47 ` Tim Harvey
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Hałasa @ 2021-07-26 10:49 UTC (permalink / raw)
  To: Tim Harvey; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel

The TD1997x chip retains vper, hper and hsper register values when the
HDMI source is disconnected. Use a different means of checking if the
link is still valid.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>

diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
index 0b516a45a135..36a7b89afb08 100644
--- a/drivers/media/i2c/tda1997x.c
+++ b/drivers/media/i2c/tda1997x.c
@@ -1107,7 +1107,8 @@ tda1997x_detect_std(struct tda1997x_state *state,
 	hper = io_read16(sd, REG_H_PER) & MASK_HPER;
 	hsper = io_read16(sd, REG_HS_WIDTH) & MASK_HSWIDTH;
 	v4l2_dbg(1, debug, sd, "Signal Timings: %u/%u/%u\n", vper, hper, hsper);
-	if (!vper || !hper || !hsper)
+
+	if (!state->input_detect[0] && !state->input_detect[1])
 		return -ENOLINK;
 
 	for (i = 0; v4l2_dv_timings_presets[i].bt.width; i++) {

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

* Re: [PATCH] TDA1997x: report -ENOLINK after disconnecting HDMI source
  2021-07-26 10:49 [PATCH] TDA1997x: report -ENOLINK after disconnecting HDMI source Krzysztof Hałasa
@ 2021-08-19 19:47 ` Tim Harvey
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Harvey @ 2021-08-19 19:47 UTC (permalink / raw)
  To: Krzysztof Hałasa; +Cc: Mauro Carvalho Chehab, linux-media, open list

On Mon, Jul 26, 2021 at 3:49 AM Krzysztof Hałasa <khalasa@piap.pl> wrote:
>
> The TD1997x chip retains vper, hper and hsper register values when the
> HDMI source is disconnected. Use a different means of checking if the
> link is still valid.
>
> Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
>
> diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
> index 0b516a45a135..36a7b89afb08 100644
> --- a/drivers/media/i2c/tda1997x.c
> +++ b/drivers/media/i2c/tda1997x.c
> @@ -1107,7 +1107,8 @@ tda1997x_detect_std(struct tda1997x_state *state,
>         hper = io_read16(sd, REG_H_PER) & MASK_HPER;
>         hsper = io_read16(sd, REG_HS_WIDTH) & MASK_HSWIDTH;
>         v4l2_dbg(1, debug, sd, "Signal Timings: %u/%u/%u\n", vper, hper, hsper);
> -       if (!vper || !hper || !hsper)
> +
> +       if (!state->input_detect[0] && !state->input_detect[1])
>                 return -ENOLINK;
>
>         for (i = 0; v4l2_dv_timings_presets[i].bt.width; i++) {

Acked-By: Tim Harvey <tharvey@gateworks.com>

Best regards,

Tim

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

end of thread, other threads:[~2021-08-19 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 10:49 [PATCH] TDA1997x: report -ENOLINK after disconnecting HDMI source Krzysztof Hałasa
2021-08-19 19:47 ` Tim Harvey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).