xf86-video-intel: Branch 'xf86-video-intel-2.6-branch' - 5 commits - man/intel.man src/bios_reader/bios_reader.c src/i830_lvds.c uxa/uxa-glyphs.c

Zhenyu Wang zhen at kemper.freedesktop.org
Tue Jan 13 19:11:01 PST 2009


 man/intel.man                 |    2 
 src/bios_reader/bios_reader.c |    4 -
 src/i830_lvds.c               |   86 ++++++++++++++++++++++++++++++++++++++----
 uxa/uxa-glyphs.c              |    9 ++--
 4 files changed, 87 insertions(+), 14 deletions(-)

New commits:
commit 7c5afbbd3e7570224ceb4fa793fe230fd3a383fe
Author: Bernhard Rosenkraenzer <bero at arklinux.org>
Date:   Tue Jan 13 10:35:19 2009 -0800

    UXA: Declare glyph cache picture as component-alpha when necessary.
    
    Without this, rendering component-alpha glyphs may break without a mask.
    
    Bug #19534.  Ported from fix by Michel Dänzer <daenzer at vmware.com> in
    xserver commit 639f289dcdbe00a516820f573c01a8339e120ed4
    (cherry picked from commit c80f1a9c5131721eaf87d12a7a67e603cdfed63b)

diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index dd26362..1c06e6d 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -140,6 +140,8 @@ uxa_unrealize_glyph_caches(ScreenPtr    pScreen,
     }
 }
 
+#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
+
 /* All caches for a single format share a single pixmap for glyph storage,
  * allowing mixing glyphs of different sizes without paying a penalty
  * for switching between source pixmaps. (Note that for a size of font
@@ -158,6 +160,7 @@ uxa_realize_glyph_caches(ScreenPtr    pScreen,
     PictFormatPtr   pPictFormat;
     PixmapPtr	    pPixmap;
     PicturePtr	    pPicture;
+    CARD32          component_alpha;
     int		    height;
     int		    i;
     int		    error;
@@ -190,8 +193,10 @@ uxa_realize_glyph_caches(ScreenPtr    pScreen,
     if (!pPixmap)
 	return FALSE;
 
+    component_alpha = NeedsComponent(pPictFormat->format);
     pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat,
-			     0, 0, serverClient, &error);
+			     CPComponentAlpha, &component_alpha, serverClient,
+			     &error);
 
     (*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */
 
@@ -729,8 +734,6 @@ uxa_glyphs_intersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs)
     return FALSE;
 }
 
-#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
-
 void
 uxa_glyphs (CARD8 	 op,
 	   PicturePtr	 pSrc,
commit c0bc3cf128d8e9e1ed643be1586593d42c8f5b49
Author: Ma Ling <ling.ma at intel.com>
Date:   Tue Jan 13 10:26:40 2009 +0800

    set continuous-frequency flag in get modes function
    
    http://bugs.freedesktop.org/show_bug.cgi?id=19247
    Because latest xorg will check whether the display is continuous frequency through one flag in monitor info structure,
    if not it doesn't touch default modes. When laptop failed to fetch edid, We don't set the flag. In i830_lvds.c,
    so currently we can not get default modes except only one mode line from bios.
    In order to achieve default modes from xserver successfully,I set the flag and other EDID features.
    (cherry picked from commit 3d206f9e46b5237bda7ca3c0f92d64c45ee8bdf5)

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 3714142..639450a 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -775,6 +775,28 @@ i830_lvds_detect(xf86OutputPtr output)
     return XF86OutputStatusConnected;
 }
 
+static void fill_detailed_block(struct detailed_monitor_section *det_mon,
+                                DisplayModePtr mode)
+{
+    struct detailed_timings *timing = &det_mon->section.d_timings;
+    det_mon->type = DT;
+    timing->clock = mode->Clock * 1000;
+    timing->h_active = mode->HDisplay;
+    timing->h_blanking = mode->HTotal - mode->HDisplay;
+    timing->v_active = mode->VDisplay;
+    timing->v_blanking = mode->VTotal - mode->VDisplay;
+    timing->h_sync_off = mode->HSyncStart - mode->HDisplay;
+    timing->h_sync_width = mode->HSyncEnd - mode->HSyncStart;
+    timing->v_sync_off = mode->VSyncStart - mode->VDisplay;
+    timing->v_sync_width = mode->VSyncEnd - mode->VSyncStart;
+
+    if (mode->Flags & V_PVSYNC)
+        timing->misc |= 0x02;
+
+    if (mode->Flags & V_PHSYNC)
+        timing->misc |= 0x01;
+}
+
 /**
  * Return the list of DDC modes if available, or the BIOS fixed mode otherwise.
  */
@@ -819,7 +841,7 @@ i830_lvds_get_modes(xf86OutputPtr output)
 	}
     }
     xf86OutputSetEDID (output, edid_mon);
-    
+
     modes = xf86OutputGetEDIDModes (output);
     if (modes != NULL)
 	return modes;
@@ -829,15 +851,35 @@ i830_lvds_get_modes(xf86OutputPtr output)
 	edid_mon = xcalloc (1, sizeof (xf86Monitor));
 	if (edid_mon)
 	{
+	    struct detailed_monitor_section *det_mon = edid_mon->det_mon;
+	    /*support DPM, instead of DPMS*/
+	    edid_mon->features.dpms |= 0x1;
+	    /*defaultly support RGB color display*/
+	    edid_mon->features.display_type |= 0x1;
+	    /*defaultly display support continuous-freqencey*/
+	    edid_mon->features.msc |= 0x1;
+	    /*defaultly  the EDID version is 1.4 */
+	    edid_mon->ver.version = 1;
+	    edid_mon->ver.revision = 4;
+
+	    if (pI830->lvds_fixed_mode != NULL) {
+		/* now we construct new EDID monitor,
+		 *  so filled one detailed timing block
+		 */
+		fill_detailed_block(det_mon, pI830->lvds_fixed_mode);
+		/* the filed timing block should be set preferred*/
+		edid_mon->features.msc |= 0x2;
+		det_mon = det_mon + 1;
+	    }
+
 	    /* Set wide sync ranges so we get all modes
 	     * handed to valid_mode for checking
 	     */
-	    edid_mon->det_mon[0].type = DS_RANGES;
-	    edid_mon->det_mon[0].section.ranges.min_v = 0;
-	    edid_mon->det_mon[0].section.ranges.max_v = 200;
-	    edid_mon->det_mon[0].section.ranges.min_h = 0;
-	    edid_mon->det_mon[0].section.ranges.max_h = 200;
-	    
+	    det_mon->type = DS_RANGES;
+	    det_mon->section.ranges.min_v = 0;
+	    det_mon->section.ranges.max_v = 200;
+	    det_mon->section.ranges.min_h = 0;
+	    det_mon->section.ranges.max_h = 200;
 	    output->MonInfo = edid_mon;
 	}
     }
commit 335d6bbdfd882eb98dc6ebd785ad2963abc6566d
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Nov 26 16:32:12 2008 +0800

    Fix LVDS EDID to match all possible default modes
    
    If the EDID data from the LVDS doesn't indicate support for a wide range of
    continuous frequencies, it will not match any of the default modes although
    our LVDS scaler logic ignores refresh rates when programming LVDS modes. Fix
    this by smashing the compute EDID data to open up the sync rates.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 3354e660b0744976871683ce226f17e873f26b50)

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 1799eab..3714142 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -788,6 +788,36 @@ i830_lvds_get_modes(xf86OutputPtr output)
     DisplayModePtr	    modes;
 
     edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
+
+    /* Our LVDS scaler can hit any size, so mark the EDID data as
+     * supporting continuous timings
+     */
+    if (edid_mon) {
+	int i, j = -1;
+	edid_mon->features.msc |= 0x1;
+
+	/* Either find a DS_RANGES block, or replace a DS_VENDOR block,
+	 * smashing it into a DS_RANGES block with wide open refresh to
+	 * match all default modes
+	 */
+	for (i = 0; i < sizeof (edid_mon->det_mon) / sizeof (edid_mon->det_mon[0]); i++)
+	{
+	    if (edid_mon->det_mon[i].type >= DS_VENDOR && j == -1)
+		j = i;
+	    if (edid_mon->det_mon[i].type == DS_RANGES) {
+		j = i;
+		break;
+	    }
+	}
+	if (j != -1) {
+	    struct monitor_ranges   *ranges = &edid_mon->det_mon[j].section.ranges;
+	    edid_mon->det_mon[j].type = DS_RANGES;
+	    ranges->min_v = 0;
+	    ranges->max_v = 200;
+	    ranges->min_h = 0;
+	    ranges->max_h = 200;
+	}
+    }
     xf86OutputSetEDID (output, edid_mon);
     
     modes = xf86OutputGetEDIDModes (output);
commit 28a44ad59eec9a6421f4ed0de5614599ac17b0d6
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Fri Jan 9 16:30:15 2009 -0800

    Remove xorgconfig & xorgcfg from See Also list in man page
    (cherry picked from commit f1e9ca4e4fb3ddb083252aea79c67c5e5e71f29c)

diff --git a/man/intel.man b/man/intel.man
index 81a94ac..00aa1be 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -445,7 +445,7 @@ more information (the xorg at lists.freedesktop.org mailing list is the
 most appropriate place to ask X.Org and driver related questions).
 
 .SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
 .SH AUTHORS
 Authors include: Keith Whitwell, and also Jonathan Bian, Matthew J Sottek,
 Jeff Hartmann, Mark Vojkovich, Alan Hourihane, H. J. Lu.  830M and 845G
commit f42015d570733aaa0eb56da5ca63d72a5b2772f7
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Jan 7 21:45:54 2009 -0800

    Prevent redefinitions of CARD8 and friends.  Fixes build.
    (cherry picked from commit 91c49067abab262edce54d33af8bfc03eee20f2e)

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 974c272..717f5bf 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -39,9 +39,7 @@
 #include "../i830_bios.h"
 
 #include <X11/Xfuncproto.h>
-typedef uint8_t CARD8;
-typedef uint16_t CARD16;
-typedef uint32_t CARD32;
+#include <X11/Xmd.h>
 #define _PARSE_EDID_
 #include "edid.h"
 


More information about the xorg-commit mailing list