xf86-video-intel: Branch 'modesetting' - src/i830_driver.c

Eric Anholt anholt at kemper.freedesktop.org
Sun Jul 9 01:28:30 EEST 2006


 src/i830_driver.c |   33 +++++++++++----------------------
 1 files changed, 11 insertions(+), 22 deletions(-)

New commits:
diff-tree 5a8f6a486d79f50d2d659e615283289d59f9caa4 (from e1064f52b0ff69ea7937897b8c951cc3e32cd752)
Author: Eric Anholt <anholt at FreeBSD.org>
Date:   Sat Jul 8 15:26:19 2006 -0700

    Improve output bus setup to include LVDS setup for pre-i915.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index ca87951..5615f4b 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1061,30 +1061,14 @@ I830SetupOutputBusses(ScrnInfoPtr pScrn)
    I830I2CInit(pScrn, &pI830->output[i].pDDCBus, GPIOA, "CRTDDC_A");
    i++;
 
-   /* need to add the output busses for each device 
-    * - this function is very incomplete
-    * - i915GM has LVDS and TVOUT for example
-    */
-   switch(pI830->PciInfo->chipType) {
-   case PCI_CHIP_I830_M:
-   case PCI_CHIP_845_G:
-   case PCI_CHIP_I855_GM:
-   case PCI_CHIP_I865_G:
-      pI830->output[i].type = I830_OUTPUT_DVO;
-      I830I2CInit(pScrn, &pI830->output[i].pDDCBus, GPIOD, "DVODDC_D");
-      I830I2CInit(pScrn, &pI830->output[i].pI2CBus, GPIOE, "DVOI2C_E");
-      i++;
-      break;
-   case PCI_CHIP_E7221_G:
-      /* ??? */
-      break;
-   case PCI_CHIP_I915_GM:
-   case PCI_CHIP_I945_GM:
+   if (IS_MOBILE(pI830) && !IS_I830(pI830)) {
+      /* Set up integrated LVDS */
       pI830->output[i].type = I830_OUTPUT_LVDS;
       I830I2CInit(pScrn, &pI830->output[i].pDDCBus, GPIOC, "LVDSDDC_C");
       i++;
-   case PCI_CHIP_I915_G:
-   case PCI_CHIP_I945_G:
+   }
+
+   if (IS_I9XX(pI830)) {
       /* Set up SDVOB */
       pI830->output[i].type = I830_OUTPUT_SDVO;
       I830I2CInit(pScrn, &pI830->output[i].pI2CBus, GPIOE, "SDVOCTRL_E");
@@ -1096,7 +1080,12 @@ I830SetupOutputBusses(ScrnInfoPtr pScrn)
       pI830->output[i].pI2CBus = pI830->output[i-1].pI2CBus;
       I830SDVOInit(pScrn, i, SDVOC);
       i++;
-      break;
+   } else {
+      /* set up DVO */
+      pI830->output[i].type = I830_OUTPUT_DVO;
+      I830I2CInit(pScrn, &pI830->output[i].pDDCBus, GPIOD, "DVODDC_D");
+      I830I2CInit(pScrn, &pI830->output[i].pI2CBus, GPIOE, "DVOI2C_E");
+      i++;
    }
    pI830->num_outputs = i;
 }



More information about the xorg-commit mailing list