[Intel-gfx] [PATCH] i830_driver.c:detect and initialize SDVOB and SDVOC at the same time.
Zhenyu Wang
zhenyu.z.wang at intel.com
Thu Feb 5 09:30:04 CET 2009
On 2009.02.05 13:22:37 +0800, Zhenyu Wang wrote:
> On 2009.02.04 01:01:49 +0800, Eric Anholt wrote:
> > On Tue, 2009-02-03 at 16:10 +0800, Ma Ling wrote:
> > > hi All,
> > >
> > > SDVO chipset has one i2c pin pare from GMCH, usually port4.
> > > So for sdvo detection we only need to check digital port B (bit 2) of SDVOB.
> > > In another word we should initialize SDVOC port at the same time when SDVOB detection is successful.
> > > The patch is based on our latest code, and intends to match the above logic.
> > > Any comments are welcome !
> >
> > First, please fix your whitespace -- you reindented a block of 3-space
> > code to 4-space.
> >
> > As of GM45, there are 2 pin pairs once again -- HDMI/DPC is on pin 3,
> > thus the new bit for detection, and this change would regress that.
> >
>
> right, so about this one?
>
Looks still miss the point as Ling and Michael has found, actually we
should check SDVO_DETECTED bit in SDVOB. So here's updated patch.
KMS always try to init SDVOB/C now. Maybe with this one we can remove
force_sdvo_detect and 965G check in user ms driver.
From b4db7436070933b33fe29d38c8fe9311b16793b7 Mon Sep 17 00:00:00 2001
From: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date: Thu, 5 Feb 2009 16:24:49 +0800
Subject: [PATCH] Init SDVOC in case SDVOB detected
For those chips with SDVO, only SDVOB enable bit is used to
trigger if SDVO exists, so we should also init SDVOC in that case.
---
src/i830_driver.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/i830_driver.c b/src/i830_driver.c
index b8d8d37..fcd871c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -914,7 +914,9 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
i830_lvds_init(pScrn);
if (IS_I9XX(pI830)) {
+ Bool sdvob_detected = FALSE;
if ((INREG(SDVOB) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
+ sdvob_detected = TRUE;
Bool found = i830_sdvo_init(pScrn, SDVOB);
if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
@@ -923,7 +925,7 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect ||
/* SDVOC detect bit is reserved on 965G/965GM */
- (IS_I965G(pI830) && !IS_G4X(pI830))) {
+ (IS_I965G(pI830) && !IS_G4X(pI830)) || sdvob_detected) {
Bool found = i830_sdvo_init(pScrn, SDVOC);
if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
--
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.freedesktop.org/archives/intel-gfx/attachments/20090205/d7d3bc55/attachment.sig>
More information about the Intel-gfx
mailing list