FROMLIST: drm/bridge: dw-hdmi: fix hdmi display lost
authorMark Yao <mark.yao@rock-chips.com>
Thu, 11 Aug 2016 07:54:03 +0000 (15:54 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 15 Aug 2016 02:02:50 +0000 (10:02 +0800)
hdmi->disabled maybe not match to the real hardware status.

->dw_hdmi_bridge_enable()
  hdmi->disabled = false;
-->dw_hdmi_update_power()
   if (hdmi->rxsense)
       force = DRM_FORCE_ON;
   else
       force = DRM_FORCE_OFF;

hdmi->rxsense maybe false on bridge enable path, then hdmi->disabled
is false, but actually hardware is power off, they are not match.

So on dw_hdmi_irq, judge the hardware status with hdmi->disabled is wrong.
This bug would cause display lost, unplug/plug can't recovery display.

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Liu Ying <gnuiyl@gmail.com>
Change-Id: Iaa5c56b5df32c6d3811f4131d63033fbccd005ae
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9274599)

drivers/gpu/drm/bridge/dw-hdmi.c

index 6af430bfc6d3fd12e2298c9bebee33e9ce5961bf..c5d7b27fd90d6992fa92dbdb765aeacfcff9a7bb 100644 (file)
@@ -1700,7 +1700,7 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
        if (intr_stat &
            (HDMI_IH_PHY_STAT0_RX_SENSE | HDMI_IH_PHY_STAT0_HPD)) {
                mutex_lock(&hdmi->mutex);
-               if (!hdmi->disabled && !hdmi->force) {
+               if (!hdmi->bridge_is_on && !hdmi->force) {
                        /*
                         * If the RX sense status indicates we're disconnected,
                         * clear the software rxsense status.