• Russell King's avatar
    drm/i2c: tda998x: re-implement "Fix EDID read timeout on HDMI connect" · 0fc6f44d
    Russell King authored
    Commit 6833d26e ("drm: tda998x: Fix EDID read timeout on HDMI
    connect") used a weak scheme to try and delay reading EDID on a HDMI
    connect event.  It is weak because delaying the notification of a
    hotplug event does not stop userspace from trying to read the EDID
    within the 100ms delay.
    
    The solution provided here solves this issue:
    * When a HDMI connection event is detected, mark a blocking flag for
      EDID reads, and start a timer for the delay.
    * If an EDID read is attempted, and the blocking flag is set, wait
      for the blocking flag to clear.
    * When the timer expires, clear the blocking flag and wake any thread
      waiting for the EDID read.
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    0fc6f44d
tda998x_drv.c 51.2 KB