]> git.baikalelectronics.ru Git - kernel.git/commit
drm: adv7511: Fix nested sleep when reading EDID
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 18 Feb 2015 13:19:33 +0000 (15:19 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 19 Mar 2015 10:28:55 +0000 (12:28 +0200)
commitadd656d6566000cb25c227d3c5ee011f3baeee5a
tree7b5e84d23a3f4c544c9a5c740ccdb299c719bcc7
parentce8d9ea849c98177beb9ebe103e6cb21f1b081f2
drm: adv7511: Fix nested sleep when reading EDID

The EDID read code waits for the read completion interrupt to occur
using wait_event_interruptible(). The condition passed to the macro
reads I2C registers. This results in sleeping with the task state set
to TASK_INTERRUPTIBLE, triggering a WARN_ON() introduced in commit
fc81b6dcb3cd6 ("sched: Debug nested sleeps").

Fix this by reworking the EDID read code. Instead of checking whether
the read is complete through I2C reads, handle the interrupt registers
in the interrupt handler and update a new edid_read flag accordingly. As
a side effect both the IRQ and polling code paths now process the
interrupt sources through the same code path, simplifying the code.

Cc: stable@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/i2c/adv7511.c