From: Wu Fengguang <wfg@linux.intel.com>
To: Wang Zhenyu <zhenyu.z.wang@intel.com>
Cc: alsa-devel@alsa-project.org, linux-gfx@linux.intel.com,
xorg@lists.freedesktop.org
Subject: [PATCH 1/3] introduce i830_hdmi_priv.has_hdmi_sink
Date: Fri, 07 Nov 2008 14:23:39 +0800 [thread overview]
Message-ID: <20081107062410.013520150@linux.intel.com> (raw)
In-Reply-To: 20081107062338.158523355@linux.intel.com
[-- Attachment #1: has-hdmi-sink.patch --]
[-- Type: text/plain, Size: 1760 bytes --]
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@linux.intel.com>
---
src/i830_hdmi.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- xf86-video-intel.orig/src/i830_hdmi.c
+++ xf86-video-intel/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,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;
}
@@ -232,6 +246,7 @@ i830_hdmi_init(ScrnInfoPtr pScrn, int ou
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;
--
next prev parent reply other threads:[~2008-11-07 6:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 6:23 [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Wu Fengguang
2008-11-07 6:23 ` Wu Fengguang [this message]
[not found] ` <20081112072747.GD14627@zhen-devel.sh.intel.com>
2008-11-12 8:16 ` [PATCH 1/3] introduce i830_hdmi_priv.has_hdmi_sink Wu Fengguang
2008-11-07 6:23 ` [PATCH 2/3] enable Intel G45 integrated HDMI audio output Wu Fengguang
2008-11-07 6:23 ` [PATCH 3/3] enable Intel G35 SDVO " Wu Fengguang
2008-11-10 18:18 ` [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Adam Jackson
2008-11-13 2:05 ` Wang, Zhenyu Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081107062410.013520150@linux.intel.com \
--to=wfg@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-gfx@linux.intel.com \
--cc=xorg@lists.freedesktop.org \
--cc=zhenyu.z.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox