[PATCH 1/3] introduce i830_hdmi_priv.has_hdmi_sink

Wang, Zhenyu Z zhenyu.z.wang at intel.com
Tue Nov 11 23:27:47 PST 2008


On 2008.11.07 14:23:39 +0800, Wu Fengguang wrote:
> HDMI is compatible with DVI, and we've seen many boards that
> use HDMI port for DVI output.
> 
> So Zhenyu proposed this flag: i830_hdmi_priv.has_hdmi_sink
> to indicate the presence of HDMI capable monitors.
> 
> Signed-off-by: Wu Fengguang <wfg at linux.intel.com>

> @@ -180,6 +184,16 @@ i830_hdmi_detect(xf86OutputPtr output)
>      edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
>      if (!edid_mon || !DIGITAL(edid_mon->features.input_type))
>  	status = XF86OutputStatusDisconnected;
> +
> +    if (xf86MonitorIsHDMI(edid_mon))
> +	dev_priv->has_hdmi_sink = TRUE;
> +
> +    if (pI830->debug_modes)
> +	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> +			"%s monitor detected on HDMI-%d\n",
> +			dev_priv->has_hdmi_sink ? "HDMI" : "DVI",
> +			(dev_priv->output_reg == SDVOB) ? 1 : 2);
> +
>      xfree(edid_mon);
>      return status;
>  }

We should check if the symbol is available for xserver compatiblity.
So below is updated patch for check this. 

I'm fine with this patch sets and tested against sony bravia doesn't
show Shane's problem.

From 4da8170b0b949102c12b5957c80c46bc70ba1bbc Mon Sep 17 00:00:00 2001
From: Wu Fengguang <wfg at linux.intel.com>
Date: Wed, 12 Nov 2008 23:10:58 +0800
Subject: [PATCH] introduce i830_hdmi_priv.has_hdmi_sink

HDMI is compatible with DVI, and we've seen many boards that
use HDMI port for DVI output.

So Zhenyu proposed this flag: i830_hdmi_priv.has_hdmi_sink
to indicate the presence of HDMI capable monitors.

Signed-off-by: Wu Fengguang <wfg at linux.intel.com>
---
 src/i830_hdmi.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/i830_hdmi.c b/src/i830_hdmi.c
index 806ca7d..a3e3ba8 100644
--- a/src/i830_hdmi.c
+++ b/src/i830_hdmi.c
@@ -38,6 +38,8 @@ struct i830_hdmi_priv {
     uint32_t output_reg;
 
     uint32_t save_SDVO;
+
+    Bool has_hdmi_sink;
 };
 
 static int
@@ -142,6 +144,8 @@ i830_hdmi_detect(xf86OutputPtr output)
     xf86OutputStatus status;
     xf86MonPtr edid_mon;
 
+    dev_priv->has_hdmi_sink = FALSE;
+
     /* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be written 0xd.
      * Failure to do so will result in spurious interrupts being
      * generated on the port when a cable is not attached.
@@ -180,6 +184,17 @@ i830_hdmi_detect(xf86OutputPtr output)
     edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
     if (!edid_mon || !DIGITAL(edid_mon->features.input_type))
 	status = XF86OutputStatusDisconnected;
+
+    if (xf86LoaderCheckSymbol("xf86MonitorIsHDMI") &&
+	    xf86MonitorIsHDMI(edid_mon))
+	dev_priv->has_hdmi_sink = TRUE;
+
+    if (pI830->debug_modes)
+	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+			"%s monitor detected on HDMI-%d\n",
+			dev_priv->has_hdmi_sink ? "HDMI" : "DVI",
+			(dev_priv->output_reg == SDVOB) ? 1 : 2);
+
     xfree(edid_mon);
     return status;
 }
@@ -232,6 +247,7 @@ i830_hdmi_init(ScrnInfoPtr pScrn, int output_reg)
 
     dev_priv = (struct i830_hdmi_priv *)(intel_output + 1);
     dev_priv->output_reg = output_reg;
+    dev_priv->has_hdmi_sink = FALSE;
 
     intel_output->dev_priv = dev_priv;
     intel_output->type = I830_OUTPUT_HDMI;
-- 
1.5.6.5


-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20081112/39133d71/attachment.pgp>


More information about the xorg mailing list