[PATCH 4/4] imx-drm: imx-hdmi: don't erroneously detect HDMI displays

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

 



While having a CEA mode is one prerequisite for using
HDMI transmit mode, we also have to check if the display
is actually capable of HDMI input. Fall back to DVI mode
otherwise.

Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
---
 drivers/staging/imx-drm/imx-hdmi.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c
index 7d407e917786..28d1cdd12cb4 100644
--- a/drivers/staging/imx-drm/imx-hdmi.c
+++ b/drivers/staging/imx-drm/imx-hdmi.c
@@ -1218,13 +1218,10 @@ static int imx_hdmi_setup(struct imx_hdmi *hdmi, struct drm_display_mode *mode)
 
 	hdmi->vic = drm_match_cea_mode(mode);
 
-	if (!hdmi->vic) {
-		dev_dbg(hdmi->dev, "Non-CEA mode used in HDMI\n");
-		hdmi->hdmi_data.video_mode.mdvi = true;
-	} else {
-		dev_dbg(hdmi->dev, "CEA mode used vic=%d\n", hdmi->vic);
+	if (drm_detect_hdmi_monitor(hdmi->edid) && hdmi->vic)
 		hdmi->hdmi_data.video_mode.mdvi = false;
-	}
+	else
+		hdmi->hdmi_data.video_mode.mdvi = true;
 
 	if ((hdmi->vic == 6) || (hdmi->vic == 7) ||
 		(hdmi->vic == 21) || (hdmi->vic == 22) ||
@@ -1273,7 +1270,7 @@ static int imx_hdmi_setup(struct imx_hdmi *hdmi, struct drm_display_mode *mode)
 	if (hdmi->hdmi_data.video_mode.mdvi)
 		dev_dbg(hdmi->dev, "%s DVI mode\n", __func__);
 	else {
-		dev_dbg(hdmi->dev, "%s CEA mode\n", __func__);
+		dev_dbg(hdmi->dev, "%s CEA mode VIC=%d\n", __func__, hdmi->vic);
 
 		/* HDMI Initialization Step E - Configure audio */
 		hdmi_clk_regenerator_update_pixel_clock(hdmi);
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux