Skip to contentSkip to conversation

TDA1997x: report -ENOLINK after disconnecting HDMI source

PATCH In review Krzysztof Hałasa 2 participants 2 messages Jul 26, 2021 – Aug 19, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TDA1997x: report -ENOLINK after disconnecting HDMI source

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.

drivers/media/i2c/tda1997x.c +2 -1
index 0b516a45a135..36a7b89afb08 100644
@@ -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++) {
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Krzysztof Hałasa

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.

drivers/media/i2c/tda1997x.c +0 -0
index 0b516a45a135..36a7b89afb08 100644

drivers/media/i2c/tda1997x.c tda1997x_detect_std(struct tda1997x_state *state, · line 1114

Quoted 9 lines
drivers/media/i2c/tda1997x.c +2 -1
@@ -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++) {

Best regards,

Tim