From: Mark Yao Date: Thu, 11 Aug 2016 07:54:03 +0000 (+0800) Subject: FROMLIST: drm/bridge: dw-hdmi: fix hdmi display lost X-Git-Tag: firefly_0821_release~1917 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=844ac424298988b4868299dd8433b0c5388ab575;p=firefly-linux-kernel-4.4.55.git FROMLIST: drm/bridge: dw-hdmi: fix hdmi display lost 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 Cc: Daniel Vetter Cc: Fabio Estevam Cc: Liu Ying Change-Id: Iaa5c56b5df32c6d3811f4131d63033fbccd005ae Signed-off-by: Mark Yao (am from https://patchwork.kernel.org/patch/9274599) --- diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c index 6af430bfc6d3..c5d7b27fd90d 100644 --- a/drivers/gpu/drm/bridge/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/dw-hdmi.c @@ -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.