xf86-video-intel: Branch 'modesetting' - 3 commits - src/i830_edid_modes.c src/i830_modes.c

Keith Packard keithp at kemper.freedesktop.org
Fri Dec 22 09:42:55 EET 2006


 src/i830_edid_modes.c |   43 +++++++++++++++++++++++--------------------
 src/i830_modes.c      |    8 ++++++++
 2 files changed, 31 insertions(+), 20 deletions(-)

New commits:
diff-tree 84915ac8afeb4bbc03df8f94ab3ba351788d6501 (from 1e9105395a7900521206b28bae4bb4f85669a0cd)
Author: Keith Packard <keithp at guitar.keithp.com>
Date:   Thu Dec 21 23:42:53 2006 -0800

    If DDC detailed modes are missing physical size, pull from features.
    
    Monitors without detailed modes, or those which do not bother to set a
    physical size in their detailed modes may still have physical size in the
    global data.

diff --git a/src/i830_modes.c b/src/i830_modes.c
index 34f6cd5..42ee79d 100644
--- a/src/i830_modes.c
+++ b/src/i830_modes.c
@@ -140,5 +140,13 @@ i830_ddc_get_modes(xf86OutputPtr output)
 	}
     }
 
+    /* if no mm size is available from a detailed timing, check the max size field */
+    if ((!output->mm_width || !output->mm_height) &&
+	(ddc_mon->features.hsize && ddc_mon->features.vsize))
+    {
+	output->mm_width = ddc_mon->features.hsize * 10;
+	output->mm_height = ddc_mon->features.vsize * 10;
+    }
+
     return ddc_modes;
 }
diff-tree 1e9105395a7900521206b28bae4bb4f85669a0cd (from parents)
Merge: df9ecf8ab93f0aeffde11d438513d41220ba75cb c237e930615f1b048895efe988d28503f5d67c37
Author: Keith Packard <keithp at guitar.keithp.com>
Date:   Thu Dec 21 23:34:30 2006 -0800

    Merge branch 'modesetting-origin' into modesetting

diff-tree df9ecf8ab93f0aeffde11d438513d41220ba75cb (from d8c5dba4d797fc50d7b2b5855f34e2d2e2ad3e4f)
Author: Keith Packard <keithp at guitar.keithp.com>
Date:   Thu Dec 21 23:32:35 2006 -0800

    Change belinea edid quirk to cover the 10 20 30W model as well.
    
    This larger model reported different (but still incorrect)
    sync polarities, so instead of flipping them, just set them to the right
    value.

diff --git a/src/i830_edid_modes.c b/src/i830_edid_modes.c
index 5357023..5cef46d 100644
--- a/src/i830_edid_modes.c
+++ b/src/i830_edid_modes.c
@@ -46,18 +46,21 @@
 
 typedef enum {
     DDC_QUIRK_NONE = 0,
-    /*
-     * Detailed timing sync polarity values are inverted
-     */
-    DDC_QUIRK_DT_SYNC_INVERT = 1 << 0,
+    /* Force detailed sync polarity to -h +v */
+    DDC_QUIRK_DT_SYNC_HM_VP = 1 << 0,
 } ddc_quirk_t;
 
-static Bool dt_sync_invert (int scrnIndex, xf86MonPtr DDC)
+static Bool quirk_dt_sync_hm_vp (int scrnIndex, xf86MonPtr DDC)
 {
     /* Belinea 1924S1W */
     if (memcmp (DDC->vendor.name, "MAX", 4) == 0 &&
 	DDC->vendor.prod_id == 1932)
 	return TRUE;
+    /* Belinea 10 20 30W */
+    if (memcmp (DDC->vendor.name, "MAX", 4) == 0 &&
+	DDC->vendor.prod_id == 2007)
+	return TRUE;
+    
     return FALSE;
 }
 
@@ -69,8 +72,8 @@ typedef struct {
 
 static const ddc_quirk_map_t ddc_quirks[] = {
     { 
-	dt_sync_invert,	DDC_QUIRK_DT_SYNC_INVERT,
-	"Detailed timing data contains inverted sync polarity"
+	quirk_dt_sync_hm_vp,	DDC_QUIRK_DT_SYNC_HM_VP,
+	"Set detailed timing sync polarity to -h +v"
     },
     { 
 	NULL,		DDC_QUIRK_NONE,
@@ -154,7 +157,6 @@ DDCModeFromDetailedTiming(int scrnIndex,
 			  int preferred, ddc_quirk_t quirks)
 {
     DisplayModePtr Mode;
-    unsigned int misc;
 
     /* We don't do stereo */
     if (timing->stereo) {
@@ -196,19 +198,20 @@ DDCModeFromDetailedTiming(int scrnIndex,
     if (timing->interlaced)
         Mode->Flags |= V_INTERLACE;
 
-    misc = timing->misc;
-    if (quirks & DDC_QUIRK_DT_SYNC_INVERT)
-	misc ^= 0x3;
-    
-    if (misc & 0x02)
-        Mode->Flags |= V_PHSYNC;
-    else
-        Mode->Flags |= V_NHSYNC;
-
-    if (misc & 0x01)
-        Mode->Flags |= V_PVSYNC;
+    if (quirks & DDC_QUIRK_DT_SYNC_HM_VP)
+	Mode->Flags |= V_NHSYNC | V_PVSYNC;
     else
-        Mode->Flags |= V_NVSYNC;
+    {
+	if (timing->misc & 0x02)
+	    Mode->Flags |= V_PHSYNC;
+	else
+	    Mode->Flags |= V_NHSYNC;
+    
+	if (timing->misc & 0x01)
+	    Mode->Flags |= V_PVSYNC;
+	else
+	    Mode->Flags |= V_NVSYNC;
+    }
 
     return Mode;
 }



More information about the xorg-commit mailing list