Skip to content

Commit

Permalink
media: TDA1997x: report -ENOLINK after disconnecting HDMI source
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Krzysztof Hałasa authored and Mauro Carvalho Chehab committed Aug 4, 2021
1 parent 7dee103 commit 5cdd19b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/i2c/tda1997x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 5cdd19b

Please sign in to comment.