]> 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)
commit56ed9c93ba682230eec5a5e85c706793fdb47459
tree7b5e84d23a3f4c544c9a5c740ccdb299c719bcc7
parent54bc86204b3faa60bc4c0d9ec505474ce9ae2d1f
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
d8c9d16271cbe ("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