Module Name:    xsrc
Committed By:   mrg
Date:           Mon Aug 15 03:06:07 UTC 2016

Modified Files:
        xsrc/external/mit/xf86-video-r128/dist/src: r128_output.c

Log Message:
merge xf86-video-r128 6.10.1


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
    xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c
diff -u xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c:1.3 xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c:1.4
--- xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c:1.3	Wed Jul 29 18:15:38 2015
+++ xsrc/external/mit/xf86-video-r128/dist/src/r128_output.c	Mon Aug 15 03:06:07 2016
@@ -260,10 +260,11 @@ static R128MonitorType R128DisplayDDCCon
 {
     ScrnInfoPtr pScrn = output->scrn;
     R128InfoPtr info = R128PTR(pScrn);
+    R128EntPtr pR128Ent = R128EntPriv(pScrn);
     unsigned char *R128MMIO = info->MMIO;
     R128OutputPrivatePtr r128_output = output->driver_private;
 
-    R128MonitorType MonType = MT_NONE;
+    R128MonitorType MonType = MT_CRT;
     xf86MonPtr *MonInfo = &output->MonInfo;
     uint32_t mask1, mask2;
 
@@ -290,8 +291,8 @@ static R128MonitorType R128DisplayDDCCon
 #endif
         return MT_LCD;
     } else if (r128_output->type == OUTPUT_VGA) {
-        mask1 = R128_GPIO_MONID_MASK_1 | (info->isPro2 ? R128_GPIO_MONID_MASK_2 : R128_GPIO_MONID_MASK_3);
-        mask2 = R128_GPIO_MONID_A_1    | (info->isPro2 ? R128_GPIO_MONID_A_2    : R128_GPIO_MONID_A_3);
+        mask1 = R128_GPIO_MONID_MASK_1 | (pR128Ent->HasCRTC2 ? R128_GPIO_MONID_MASK_3 : R128_GPIO_MONID_MASK_2);
+        mask2 = R128_GPIO_MONID_A_1    | (pR128Ent->HasCRTC2 ? R128_GPIO_MONID_A_3    : R128_GPIO_MONID_A_2);
     } else {
         mask1 = R128_GPIO_MONID_MASK_0 | R128_GPIO_MONID_MASK_3;
         mask2 = R128_GPIO_MONID_A_0    | R128_GPIO_MONID_A_3;
@@ -318,9 +319,6 @@ static R128MonitorType R128DisplayDDCCon
             else
                 MonType = MT_CRT;
 	}
-    } else if (xf86I2CProbeAddress(r128_output->pI2CBus, 0x0060)) {
-        /* Just in case. */
-        MonType = MT_CRT;
     }
 
     return MonType;
@@ -527,7 +525,7 @@ Bool R128SetupConnectors(ScrnInfoPtr pSc
 
         if (otypes[i] != OUTPUT_LVDS && info->DDC) {
             i2c.ddc_reg      = R128_GPIO_MONID;
-            if (otypes[i] == OUTPUT_VGA && info->isPro2) {
+            if (otypes[i] == OUTPUT_VGA && !pR128Ent->HasCRTC2) {
                 i2c.put_clk_mask = R128_GPIO_MONID_EN_2;
                 i2c.get_clk_mask = R128_GPIO_MONID_Y_2;
             } else {

Reply via email to