drm/bridge: adv7511: Use work_struct to defer hotplug handing to out of irq context
authorJohn Stultz <john.stultz@linaro.org>
Tue, 17 Jan 2017 00:52:47 +0000 (16:52 -0800)
committerArchit Taneja <architt@codeaurora.org>
Thu, 19 Jan 2017 03:34:39 +0000 (09:04 +0530)
commit518cb7057a59b9441336d2e88a396d52b6ab0cce
treea0270df02b57eb59d51df67217df9dfa8b4680e4
parentc77b9abf3c5ae86dcb0e414d55d42fb213e51b2a
drm/bridge: adv7511: Use work_struct to defer hotplug handing to out of irq context

I was recently seeing issues with EDID probing, where
the logic to wait for the EDID read bit to be set by the
IRQ wasn't happening and the code would time out and fail.

Digging deeper, I found this was due to the fact that
IRQs were disabled as we were running in IRQ context from
the HPD signal.

Thus this patch changes the logic to handle the HPD signal
via a work_struct so we can be out of irq context.

With this patch, the EDID probing on hotplug does not time
out.

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-2-git-send-email-john.stultz@linaro.org
drivers/gpu/drm/bridge/adv7511/adv7511.h
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c