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)
commita5241289c4139f0521b89e34a70f5f998463ae15
tree7b5e84d23a3f4c544c9a5c740ccdb299c719bcc7
parent2e96206c4f952295e11c311fbb2a7aa2105024af
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
8eb23b9f35aae ("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
This page took 0.02699 seconds and 5 git commands to generate.