Skip to content

Commit 5cdd19b

Browse files
Krzysztof Hałasamchehab
authored andcommitted
media: 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. Signed-off-by: Krzysztof Hałasa <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 7dee103 commit 5cdd19b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/media/i2c/tda1997x.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,8 @@ tda1997x_detect_std(struct tda1997x_state *state,
11071107
hper = io_read16(sd, REG_H_PER) & MASK_HPER;
11081108
hsper = io_read16(sd, REG_HS_WIDTH) & MASK_HSWIDTH;
11091109
v4l2_dbg(1, debug, sd, "Signal Timings: %u/%u/%u\n", vper, hper, hsper);
1110-
if (!vper || !hper || !hsper)
1110+
1111+
if (!state->input_detect[0] && !state->input_detect[1])
11111112
return -ENOLINK;
11121113

11131114
for (i = 0; v4l2_dv_timings_presets[i].bt.width; i++) {

0 commit comments

Comments
 (0)