[PATCH] drm/bridge: dw-hdmi: fix hdmi display lost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
Cc: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
Cc: Liu Ying <gnuiyl@xxxxxxxxx>

Signed-off-by: Mark Yao <mark.yao@xxxxxxxxxxxxxx>
---
 drivers/gpu/drm/bridge/dw-hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c
index 77ab473..a4fcb47 100644
--- a/drivers/gpu/drm/bridge/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/dw-hdmi.c
@@ -1563,7 +1563,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.
-- 
1.9.1


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux