]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i2c: tda998x: re-implement "Fix EDID read timeout on HDMI connect"
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 6 Jun 2015 20:41:09 +0000 (21:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 15 Sep 2015 15:19:48 +0000 (16:19 +0100)
commitd9f7a362a02b7e9b7df7c6ee63f6a4d77d3613ef
treebf0e5d5e975a34c36e352d48609e0a1df7e871c8
parent66f0ef772be5e7fa056dad0678a6cf53e63b4751
drm/i2c: tda998x: re-implement "Fix EDID read timeout on HDMI connect"

Commit a703b37ff359 ("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: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpu/drm/i2c/tda998x_drv.c