[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-intel: Changes to 'upstream-experimental'



 .gitignore                       |    1 
 NEWS                             |   61 
 configure.ac                     |   85 
 man/Makefile.am                  |   17 
 man/intel.man                    |   14 
 src/Makefile.am                  |   70 
 src/common.h                     |  237 --
 src/drmmode_display.c            | 1502 ------------
 src/i810.h                       |  341 --
 src/i810_accel.c                 |  617 -----
 src/i810_common.h                |  191 -
 src/i810_cursor.c                |  266 --
 src/i810_dga.c                   |  282 --
 src/i810_dri.c                   | 1544 -------------
 src/i810_dri.h                   |  131 -
 src/i810_driver.c                | 2410 --------------------
 src/i810_hwmc.c                  |  419 ---
 src/i810_io.c                    |  133 -
 src/i810_memory.c                |  428 ---
 src/i810_reg.h                   | 3443 -----------------------------
 src/i810_ring.h                  |   90 
 src/i810_video.c                 | 1423 ------------
 src/i810_wmark.c                 |  313 --
 src/i830.h                       |  659 -----
 src/i830_3d.c                    |    2 
 src/i830_accel.c                 |  124 -
 src/i830_batchbuffer.c           |  268 --
 src/i830_batchbuffer.h           |  215 -
 src/i830_dri.c                   | 1071 ---------
 src/i830_driver.c                | 1461 ------------
 src/i830_hwmc.c                  |  260 --
 src/i830_hwmc.h                  |   75 
 src/i830_memory.c                |  283 --
 src/i830_reg.h                   |   67 
 src/i830_render.c                |   60 
 src/i830_uxa.c                   | 1180 ----------
 src/i830_video.c                 | 1743 ---------------
 src/i830_video.h                 |   87 
 src/i915_3d.c                    |    6 
 src/i915_render.c                |   80 
 src/i915_video.c                 |   19 
 src/i965_reg.h                   |  241 ++
 src/i965_render.c                |   49 
 src/i965_video.c                 |   21 
 src/intel.h                      |  670 +++++
 src/intel_batchbuffer.c          |  280 ++
 src/intel_batchbuffer.h          |  213 +
 src/intel_display.c              | 1617 +++++++++++++
 src/intel_dri.c                  | 1094 +++++++++
 src/intel_driver.c               | 1294 +++++++++++
 src/intel_driver.h               |  278 ++
 src/intel_hwmc.c                 |  260 ++
 src/intel_hwmc.h                 |   75 
 src/intel_memory.c               |  305 ++
 src/intel_module.c               |  482 ++++
 src/intel_uxa.c                  | 1426 ++++++++++++
 src/intel_video.c                | 1782 +++++++++++++++
 src/intel_video.h                |   88 
 src/legacy/Makefile.am           |   17 
 src/legacy/README                |    6 
 src/legacy/i810/Makefile.am      |   35 
 src/legacy/i810/i810.h           |  335 ++
 src/legacy/i810/i810_accel.c     |  617 +++++
 src/legacy/i810/i810_common.h    |  321 ++
 src/legacy/i810/i810_cursor.c    |  266 ++
 src/legacy/i810/i810_dga.c       |  258 ++
 src/legacy/i810/i810_dri.c       | 1418 ++++++++++++
 src/legacy/i810/i810_dri.h       |  131 +
 src/legacy/i810/i810_driver.c    | 2120 ++++++++++++++++++
 src/legacy/i810/i810_hwmc.c      |  419 +++
 src/legacy/i810/i810_io.c        |  133 +
 src/legacy/i810/i810_memory.c    |  428 +++
 src/legacy/i810/i810_reg.h       | 3194 +++++++++++++++++++++++++++
 src/legacy/i810/i810_ring.h      |   90 
 src/legacy/i810/i810_video.c     | 1423 ++++++++++++
 src/legacy/i810/i810_wmark.c     |  313 ++
 src/legacy/i810/xvmc/I810XvMC.c  | 4509 +++++++++++++++++++++++++++++++++++++++
 src/legacy/i810/xvmc/I810XvMC.h  |  366 +++
 src/legacy/i810/xvmc/Makefile.am |   11 
 src/legacy/legacy.h              |    3 
 src/xvmc/I810XvMC.c              | 4509 ---------------------------------------
 src/xvmc/I810XvMC.h              |  366 ---
 src/xvmc/Makefile.am             |   13 
 src/xvmc/i915_xvmc.c             |    4 
 src/xvmc/i915_xvmc.h             |    2 
 src/xvmc/i965_xvmc.c             |    5 
 src/xvmc/intel_xvmc.h            |    2 
 src/xvmc/xvmc_vld.c              |    5 
 uxa/uxa-accel.c                  |    6 
 uxa/uxa-glyphs.c                 |   37 
 uxa/uxa-priv.h                   |    1 
 uxa/uxa-render.c                 |   12 
 uxa/uxa.c                        |   14 
 93 files changed, 26903 insertions(+), 26339 deletions(-)

New commits:
commit d4c013cb9d92d2959c9a98eca20e43ab14ae22e3
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Sep 28 20:49:52 2010 -0700

    Increment version to 2.12.902
    
    Just before making the 2.12.902 (2.13-rc2) snapshot.

diff --git a/configure.ac b/configure.ac
index 4197805..e066b3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-intel],
-        [2.12.901],
+        [2.12.902],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-intel])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 35e7da7df0b286b5168a85d540cc9fdf55c1cae6
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Sep 28 20:49:10 2010 -0700

    Add release notes for the 2.12.902 snapshot.
    
    Summarizing the 5 recent changes to the driver.

diff --git a/NEWS b/NEWS
index a31c6aa..1754b25 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,17 @@
+Snapshot 2.12.902 (2010-09-28)
+==============================
+This is the second release candidate in preparation for the upcoming
+2.13.0 release. The comes exactly one week after 2.12.902 and includes
+only a handful of changes.
+
+One significant change is that the drive now requires libdrm 2.4.22
+(or newer), as several people reported compilation failures of
+xf86-video-intel 2.12.901 with libdrm 2.4.21.
+
+Other changes include a fix to compile for the 1.6 series X server, a
+fix to retry framebuffer allocation after an initial failure, and a
+fix to disable dri2 after fallbacks are forced on.
+
 Snapshot 2.12.901 (2010-09-21)
 ==============================
 This is the first release candidate in preparation for the upcoming

commit 5704955538f59a2b7a5eff67cc23953d2f27d523
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Sep 28 20:44:40 2010 -0700

    Fix to depend on the (just-released) libdrm >= 2.4.22
    
    With libdrm < 2.4.22, the compilation of xf86-video-intel would fail
    due to an undefined DRM_MODE_CONNECTOR_eDP. We now ensure that a
    sufficiently new libdrm is available before compiling.

diff --git a/configure.ac b/configure.ac
index 6c84902..4197805 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,7 +79,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Obtain compiler/linker options for the driver dependencies
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6 xproto fontsproto $REQUIRED_MODULES])
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.21])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.22])
 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
 
 sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`

commit 40c9d180bf43af84ae05d88e993deedf76e263e6
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 26 23:09:04 2010 +0100

    Retry framebuffer allocation if first attempt fails.
    
    If we are tiled, we may fail the allocation due to an EIO and so not
    being able to set tiling. Try again with an untiled request in this
    case.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/intel_memory.c b/src/intel_memory.c
index 4f1b009..3a25ba6 100644
--- a/src/intel_memory.c
+++ b/src/intel_memory.c
@@ -209,6 +209,10 @@ retry:
 						width, height, intel->cpp,
 						&tiling_mode, &pitch, 0);
 	if (front_buffer == NULL) {
+		if (tiling_mode != I915_TILING_NONE) {
+			tiling_mode = I915_TILING_NONE;
+			goto retry;
+		}
 		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
 			   "Failed to allocate framebuffer.\n");
 		return NULL;

commit 537e73f3f935b917f2f5f9b51499cb29d65e3889
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Sep 24 17:37:41 2010 +0100

    Disable dri2 after forcing fallbacks
    
    If we force fallbacks, then we will only create pixmaps in system
    memory, preventing DRI2 from passing valid bo names to the clients. In
    this case, they will just fallback to swrast. If we disable DRI2 after
    forcing fallbacks (e.g. regenerating after a GPU hang or explicitly
    disabled with the shadow buffer) then it is simpler just to disable the
    extension and allow mesa to use pure swrast.
    
    Reported-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/intel_dri.c b/src/intel_dri.c
index 4f66937..9804272 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -1029,6 +1029,12 @@ Bool I830DRI2ScreenInit(ScreenPtr screen)
 	const char *driverNames[1];
 #endif
 
+	if (intel->force_fallback) {
+		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+			   "cannot enable DRI2 whilst forcing software fallbacks\n");
+		return FALSE;
+	}
+
 	if (xf86LoaderCheckSymbol("DRI2Version"))
 		DRI2Version(&dri2_major, &dri2_minor);
 
diff --git a/src/intel_driver.c b/src/intel_driver.c
index c0ad69e..d086d94 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -588,13 +588,59 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
 	intel_check_chipset_option(scrn);
 	intel_check_dri_option(scrn);
 
-	I830XvInit(scrn);
-
 	if (!intel_init_bufmgr(intel)) {
 		PreInitCleanup(scrn);
 		return FALSE;
 	}
 
+	intel->force_fallback =
+		drmCommandNone(intel->drmSubFD, DRM_I915_GEM_THROTTLE) != 0;
+	intel->use_shadow = FALSE;
+
+	/* Enable tiling by default */
+	intel->tiling = TRUE;
+
+	/* Allow user override if they set a value */
+	if (xf86IsOptionSet(intel->Options, OPTION_TILING)) {
+		if (xf86ReturnOptValBool(intel->Options, OPTION_TILING, FALSE))
+			intel->tiling = TRUE;
+		else
+			intel->tiling = FALSE;
+	}
+
+	if (xf86IsOptionSet(intel->Options, OPTION_SHADOW)) {
+		if (xf86ReturnOptValBool(intel->Options, OPTION_SHADOW, FALSE))
+			intel->force_fallback = intel->use_shadow = TRUE;
+	}
+
+	if (intel->use_shadow) {
+		xf86DrvMsg(scrn->scrnIndex, X_CONFIG,
+			   "Shadow buffer enabled,"
+			   " GPU acceleration disabled.\n");
+	}
+
+	/* SwapBuffers delays to avoid tearing */
+	intel->swapbuffers_wait = TRUE;
+
+	/* Allow user override if they set a value */
+	if (xf86IsOptionSet(intel->Options, OPTION_SWAPBUFFERS_WAIT)) {
+		if (xf86ReturnOptValBool
+		    (intel->Options, OPTION_SWAPBUFFERS_WAIT, FALSE))
+			intel->swapbuffers_wait = TRUE;
+		else
+			intel->swapbuffers_wait = FALSE;
+	}
+
+	if (IS_GEN6(intel))
+	    intel->swapbuffers_wait = FALSE;
+
+	xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Tiling %sabled\n",
+		   intel->tiling ? "en" : "dis");
+	xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "SwapBuffers wait %sabled\n",
+		   intel->swapbuffers_wait ? "en" : "dis");
+
+	I830XvInit(scrn);
+
 	if (!intel_mode_pre_init(scrn, intel->drmSubFD, intel->cpp)) {
 		PreInitCleanup(scrn);
 		return FALSE;
@@ -830,57 +876,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
 
 	scrn->videoRam = device->regions[fb_bar].size / 1024;
 
-#ifdef DRI2
-	if (intel->directRenderingType == DRI_NONE
-	    && I830DRI2ScreenInit(screen))
-		intel->directRenderingType = DRI_DRI2;
-#endif
-
-	intel->force_fallback = FALSE;
-	intel->use_shadow = FALSE;
-
-	/* Enable tiling by default */
-	intel->tiling = TRUE;
-
-	/* Allow user override if they set a value */
-	if (xf86IsOptionSet(intel->Options, OPTION_TILING)) {
-		if (xf86ReturnOptValBool(intel->Options, OPTION_TILING, FALSE))
-			intel->tiling = TRUE;
-		else
-			intel->tiling = FALSE;
-	}
-
-	if (xf86IsOptionSet(intel->Options, OPTION_SHADOW)) {
-		if (xf86ReturnOptValBool(intel->Options, OPTION_SHADOW, FALSE))
-			intel->force_fallback = intel->use_shadow = TRUE;
-	}
-
-	if (intel->use_shadow) {
-		xf86DrvMsg(scrn->scrnIndex, X_CONFIG,
-			   "Shadow buffer enabled,"
-			   " GPU acceleration disabled.\n");
-	}
-
-	/* SwapBuffers delays to avoid tearing */
-	intel->swapbuffers_wait = TRUE;
-
-	/* Allow user override if they set a value */
-	if (xf86IsOptionSet(intel->Options, OPTION_SWAPBUFFERS_WAIT)) {
-		if (xf86ReturnOptValBool
-		    (intel->Options, OPTION_SWAPBUFFERS_WAIT, FALSE))
-			intel->swapbuffers_wait = TRUE;
-		else
-			intel->swapbuffers_wait = FALSE;
-	}
-
-	if (IS_GEN6(intel))
-	    intel->swapbuffers_wait = FALSE;
-
-	xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Tiling %sabled\n",
-		   intel->tiling ? "en" : "dis");
-	xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "SwapBuffers wait %sabled\n",
-		   intel->swapbuffers_wait ? "en" : "dis");
-
 	intel->last_3d = LAST_3D_OTHER;
 	intel->overlayOn = FALSE;
 
@@ -894,6 +889,12 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
 		   intel->pEnt->device->videoRam ? X_CONFIG : X_DEFAULT,
 		   "VideoRam: %d KB\n", scrn->videoRam);
 
+#ifdef DRI2
+	if (intel->directRenderingType == DRI_NONE
+	    && I830DRI2ScreenInit(screen))
+		intel->directRenderingType = DRI_DRI2;
+#endif
+
 	if (!intel_init_initial_framebuffer(scrn))
 		return FALSE;
 

commit b84925b9c0842ba4dfa3481c09d3a80f84db4838
Author: Matthias Hopf <mhopf@suse.de>
Date:   Tue Aug 17 18:05:02 2010 +0200

    Make driver compile for 1.6 Xserver series again.
    
    Signed-off-by: Matthias Hopf <mhopf@suse.de>

diff --git a/src/i915_render.c b/src/i915_render.c
index f50b5c9..fafdac5 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -82,8 +82,10 @@ static struct formatinfo i915_tex_formats[] = {
 	{PICT_x8r8g8b8, MAPSURF_32BIT | MT_32BIT_XRGB8888},
 	{PICT_a8b8g8r8, MAPSURF_32BIT | MT_32BIT_ABGR8888},
 	{PICT_x8b8g8r8, MAPSURF_32BIT | MT_32BIT_XBGR8888},
+#if XORG_VERSION_CURRENT >= 10699900
 	{PICT_a2r10g10b10, MAPSURF_32BIT | MT_32BIT_ARGB2101010},
 	{PICT_a2b10g10r10, MAPSURF_32BIT | MT_32BIT_ABGR2101010},
+#endif
 	{PICT_r5g6b5, MAPSURF_16BIT | MT_16BIT_RGB565},
 	{PICT_a1r5g5b5, MAPSURF_16BIT | MT_16BIT_ARGB1555},
 	{PICT_a4r4g4b4, MAPSURF_16BIT | MT_16BIT_ARGB4444},
@@ -156,10 +158,12 @@ static Bool i915_get_dest_format(PicturePtr dest_picture, uint32_t * dst_format)
 	case PICT_x1r5g5b5:
 		*dst_format = COLR_BUF_ARGB1555;
 		break;
+#if XORG_VERSION_CURRENT >= 10699900
 	case PICT_a2r10g10b10:
 	case PICT_x2r10g10b10:
 		*dst_format = COLR_BUF_ARGB2AAA;
 		break;
+#endif
 	case PICT_a8:
 		*dst_format = COLR_BUF_8BIT;
 		break;
diff --git a/src/i965_render.c b/src/i965_render.c
index 37a7ab7..15fbe49 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -117,10 +117,12 @@ static struct formatinfo i965_tex_formats[] = {
 	{PICT_r8g8b8, BRW_SURFACEFORMAT_R8G8B8_UNORM},
 	{PICT_r5g6b5, BRW_SURFACEFORMAT_B5G6R5_UNORM},
 	{PICT_a1r5g5b5, BRW_SURFACEFORMAT_B5G5R5A1_UNORM},
+#if XORG_VERSION_CURRENT >= 10699900
 	{PICT_a2r10g10b10, BRW_SURFACEFORMAT_B10G10R10A2_UNORM},
 	{PICT_x2r10g10b10, BRW_SURFACEFORMAT_B10G10R10X2_UNORM},
 	{PICT_a2b10g10r10, BRW_SURFACEFORMAT_R10G10B10A2_UNORM},
 	{PICT_x2r10g10b10, BRW_SURFACEFORMAT_B10G10R10X2_UNORM},
+#endif
 	{PICT_a4r4g4b4, BRW_SURFACEFORMAT_B4G4R4A4_UNORM},
 };
 
@@ -169,10 +171,12 @@ static Bool i965_get_dest_format(PicturePtr dest_picture, uint32_t * dst_format)
 	case PICT_x8b8g8r8:
 		*dst_format = BRW_SURFACEFORMAT_R8G8B8A8_UNORM;
 		break;
+#if XORG_VERSION_CURRENT >= 10699900
 	case PICT_a2r10g10b10:
 	case PICT_x2r10g10b10:
 		*dst_format = BRW_SURFACEFORMAT_B10G10R10A2_UNORM;
 		break;
+#endif
 	case PICT_r5g6b5:
 		*dst_format = BRW_SURFACEFORMAT_B5G6R5_UNORM;
 		break;
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index a2ad651..a5066c8 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -47,7 +47,9 @@ format_for_depth(int depth)
 	case 16: return PICT_r5g6b5;
 	default:
 	case 24: return PICT_x8r8g8b8;
+#if XORG_VERSION_CURRENT >= 10699900
 	case 30: return PICT_x2r10g10b10;
+#endif
 	case 32: return PICT_a8r8g8b8;
 	}
 }
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 3194d23..fd8eb93 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -108,6 +108,7 @@ op_to_string(CARD8 op)
 	/*
 	 * Operators only available in version 0.2
 	 */
+#if RENDER_MAJOR >= 1 || RENDER_MINOR >= 2
 	C(DisjointClear);
 	C(DisjointSrc);
 	C(DisjointDst);
@@ -133,10 +134,12 @@ op_to_string(CARD8 op)
 	C(ConjointAtop);
 	C(ConjointAtopReverse);
 	C(ConjointXor);
+#endif
 
 	/*
 	 * Operators only available in version 0.11
 	 */
+#if RENDER_MAJOR >= 1 || RENDER_MINOR >= 11
 	C(Multiply);
 	C(Screen);
 	C(Overlay);
@@ -152,6 +155,7 @@ op_to_string(CARD8 op)
 	C(HSLSaturation);
 	C(HSLColor);
 	C(HSLLuminosity);
+#endif
     default: return "garbage";
 #undef C
     }
@@ -237,11 +241,13 @@ uxa_get_pixel_from_rgba(CARD32 * pixel,
 		gshift = rbits;
 		bshift = gshift + gbits;
 		ashift = bshift + bbits;
+#if XORG_VERSION_CURRENT >= 10699900
 	} else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) {
 		ashift = 0;
 		rshift = abits;
 		gshift = rshift + rbits;
 		bshift = gshift + gbits;
+#endif
 	} else {
 		return FALSE;
 	}
@@ -283,6 +289,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel,
 		gshift = rbits;
 		bshift = gshift + gbits;
 		ashift = bshift + bbits;
+#if XORG_VERSION_CURRENT >= 10699900
         } else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) {
 		ashift = 0;
 		rshift = abits;
@@ -290,6 +297,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel,
 			rshift = PICT_FORMAT_BPP(format) - (rbits+gbits+bbits);
 		gshift = rshift + rbits;
 		bshift = gshift + gbits;
+#endif
 	} else {
 		return FALSE;
 	}

commit 99f8d68d3dbc54fdd7de4a6df546cfa89422a0c2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Sep 22 12:34:00 2010 +0100

    display: Refactor is_panel()
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/intel_display.c b/src/intel_display.c
index ffcdb73..74ce736 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -658,6 +658,13 @@ intel_crtc_init(ScrnInfoPtr scrn, struct intel_mode *mode, int num)
 	list_add(&intel_crtc->link, &mode->crtcs);
 }
 
+static Bool
+is_panel(int type)
+{
+	return (type == DRM_MODE_CONNECTOR_LVDS ||
+	       	type == DRM_MODE_CONNECTOR_eDP);
+}
+
 static xf86OutputStatus
 intel_output_detect(xf86OutputPtr output)
 {
@@ -823,8 +830,7 @@ intel_output_get_modes(xf86OutputPtr output)
 	 * If it is incorrect, please fix me.
 	 */
 	intel_output->has_panel_limits = FALSE;
-	if (koutput->connector_type == DRM_MODE_CONNECTOR_LVDS ||
-	    koutput->connector_type == DRM_MODE_CONNECTOR_eDP) {
+	if (is_panel(koutput->connector_type)) {
 		for (i = 0; i < koutput->count_modes; i++) {
 			drmModeModeInfo *mode_ptr;
 
@@ -1293,8 +1299,7 @@ intel_output_init(ScrnInfoPtr scrn, struct intel_mode *mode, int num)
 	output->subpixel_order = subpixel_conv_table[koutput->subpixel];
 	output->driver_private = intel_output;
 
-	if (koutput->connector_type == DRM_MODE_CONNECTOR_LVDS ||
-	    koutput->connector_type == DRM_MODE_CONNECTOR_eDP)
+	if (is_panel(koutput->connector_type))
 		intel_output_backlight_init(output);
 
 	output->possible_crtcs = kencoder->possible_crtcs;

commit 4ba27e1f2198fc10a1dd268ed9f137bac6e80086
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Sep 21 17:43:01 2010 -0700

    Bump version to 2.12.901
    
    Just prior to pushing out this new snapshot.

diff --git a/configure.ac b/configure.ac
index 2845702..6c84902 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-intel],
-        [2.12.0],
+        [2.12.901],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-intel])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 334265fa5ef18405bd8c897343fff49ad53f5fce
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Sep 21 17:42:21 2010 -0700

    NEWS: Add notes for the 2.12.901 snapshot
    
    (Otherwise known as rc1 for 2.13)

diff --git a/NEWS b/NEWS
index aee6a21..a31c6aa 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,48 @@
-Snapshot 2.12.0 (2010-06-24)
-=============================
+Snapshot 2.12.901 (2010-09-21)
+==============================
+This is the first release candidate in preparation for the upcoming
+2.13.0 release. We will appreciate any feedback we can get from
+testing of this snapshot.
+
+Bugs fixed in this snapshot (compared to 2.12.0)
+------------------------------------------------
+ * Attempt to fix infinite MI_WAIT_FOR_EVENT while watching video
+   https://bugs.freedesktop.org/show_bug.cgi?id=28964
+
+   [Various new checks have been added to the video code here, but the
+   bug fix hasn't yet been verified by the original reporter.]
+
+ * Fix buffer-object leak
+   https://bugs.freedesktop.org/show_bug.cgi?id=26946
+
+ * Fix memory leak on server reset
+
+ * Fix crash due to unchecked pixmap allocation
+   https://bugs.freedesktop.org/show_bug.cgi?id=29187
+
+ * Fix for video artifacts when using dualscreen
+   https://bugs.freedesktop.org/show_bug.cgi?id=29213
+
+ * Fix for incorrect characters in gnome-terminal when using compiz
+   https://bugs.freedesktop.org/show_bug.cgi?id=28438
+
+ * Fix for hanging, full-screen applications, (flash, compiz, etc.)
+   https://bugs.freedesktop.org/show_bug.cgi?id=29584
+
+ * Fix selection of backlight device on multi-GPU systems
+   https://bugs.freedesktop.org/show_bug.cgi?id=29273
+
+ * Fix to avoid crash with extremely large glyphs
+   https://bugs.freedesktop.org/show_bug.cgi?id=29430
+
+ * Fix for eDP panels incorrectly being given only a single, valid mode
+   https://bugs.freedesktop.org/show_bug.cgi?id=30069
+
+ * Fix GPU hang involving clipped SRC copies
+   https://bugs.freedesktop.org/show_bug.cgi?id=30120
+
+Release 2.12.0 (2010-06-24)
+===========================
 We are pleased to announce this major release of the xf86-video-intel
 2D driver. It contains many correctness and performance improvements
 compared to the 2.11 releases. We encourage everyone using 2.11 to

commit bfba6d6148b938588ffbefdf04f4e71683c66dfd
Author: Krzysztof Halasa <khc@pm.waw.pl>
Date:   Tue Sep 21 22:56:26 2010 +0100

    Allow interlaced modes.
    
    This may not the best method, but it should be a good base on which to
    build...
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/intel_display.c b/src/intel_display.c
index 5d85baa..ffcdb73 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -1299,6 +1299,7 @@ intel_output_init(ScrnInfoPtr scrn, struct intel_mode *mode, int num)
 
 	output->possible_crtcs = kencoder->possible_crtcs;
 	output->possible_clones = kencoder->possible_clones;
+	output->interlaceAllowed = TRUE;
 
 	intel_output->output = output;
 	list_add(&intel_output->link, &mode->outputs);
diff --git a/src/intel_dri.c b/src/intel_dri.c
index db1f81a..4f66937 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -367,6 +367,12 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 				    event = MI_WAIT_FOR_PIPEB_SVBLANK;
 			}
 
+			if (scrn->currentMode->Flags & V_INTERLACE) {
+				/* DSL count field lines */
+				y1 /= 2;
+				y2 /= 2;
+			}
+
 			BEGIN_BATCH(5);
 			/*
 			 * The documentation says that the LOAD_SCAN_LINES
diff --git a/src/intel_video.c b/src/intel_video.c
index 30a0c37..9c918d5 100644
--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -1348,13 +1348,19 @@ intel_wait_for_scanline(ScrnInfoPtr scrn, PixmapPtr pixmap,
 			event = MI_WAIT_FOR_PIPEB_SVBLANK;
 	}
 
+	if (scrn->currentMode->Flags & V_INTERLACE) {
+		/* DSL count field lines */
+		y1 /= 2;
+		y2 /= 2;
+	}
+
 	BEGIN_BATCH(5);
 	/* The documentation says that the LOAD_SCAN_LINES command
 	 * always comes in pairs. Don't ask me why. */
 	OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | pipe);
-	OUT_BATCH((box.y1 << 16) | box.y2);
+	OUT_BATCH((y1 << 16) | y2);
 	OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | pipe);
-	OUT_BATCH((box.y1 << 16) | box.y2);
+	OUT_BATCH((y1 << 16) | y2);
 	OUT_BATCH(MI_WAIT_FOR_EVENT | event);
 	ADVANCE_BATCH();
 }

commit f63c7df6866fed61551d39209b1a262e2a0c4b28
Author: Zhenyu Wang <zhenyuw@linux.intel.com>
Date:   Fri Sep 17 16:39:12 2010 +0800

    Disable swap buffer wait on Sandybridge
    
    MI_LOAD_SCAN_LINE_INCL command is not available on sandybridge.
    I haven't got reply on any substitution for it, so turn it off for now.
    
    Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>

diff --git a/src/intel_driver.c b/src/intel_driver.c
index 6087f55..c0ad69e 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -873,6 +873,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
 			intel->swapbuffers_wait = FALSE;
 	}
 
+	if (IS_GEN6(intel))
+	    intel->swapbuffers_wait = FALSE;
+
 	xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Tiling %sabled\n",
 		   intel->tiling ? "en" : "dis");
 	xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "SwapBuffers wait %sabled\n",

commit 55b5fe888002258dd863d41977bfbfcf1a922179
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Sep 16 16:50:13 2010 +0100

    Add alternate pci-id for B43
    
    Confirmed by http://en.wikipedia.org/wiki/Intel_GMA
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30221
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/intel_driver.h b/src/intel_driver.h
index 50f176a..b55c8c9 100644
--- a/src/intel_driver.h
+++ b/src/intel_driver.h
@@ -158,6 +158,11 @@
 #define PCI_CHIP_B43_G_BRIDGE	0x2E40
 #endif
 
+#ifndef PCI_CHIP_B43_G1
+#define PCI_CHIP_B43_G1		0x2E92
+#define PCI_CHIP_B43_G1_BRIDGE	0x2E90
+#endif
+
 #ifndef PCI_CHIP_IGDNG_D_G
 #define PCI_CHIP_IGDNG_D_G		0x0042
 #define PCI_CHIP_IGDNG_D_G_BRIDGE	0x0040
diff --git a/src/intel_module.c b/src/intel_module.c
index d37896e..53e1cb6 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -70,6 +70,7 @@ static const SymTabRec _intel_chipsets[] = {
     {PCI_CHIP_Q45_G,		"Q45/Q43"},
     {PCI_CHIP_G41_G,		"G41"},
     {PCI_CHIP_B43_G,		"B43"},
+    {PCI_CHIP_B43_G1,		"B43"},
     {PCI_CHIP_IGDNG_D_G,		"Clarkdale"},
     {PCI_CHIP_IGDNG_M_G,		"Arrandale"},
     {PCI_CHIP_SANDYBRIDGE_GT1,	"Sandybridge" },

commit 08c2caca48323d6d5701dcef3486f850619d7905
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 12 12:34:51 2010 +0100

    uxa: Apply source clipping to blits
    
    Yes, this should be done in the higher layers. Yes, I have written code
    to that. No, it is not ready, hence add the sanity check to the
    SRC_COPY_BLT.
    
    This isn't the first report that I've seen, but will be the last.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30120
    Reported-by: rezbit.hex@gmail.com
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/intel_uxa.c b/src/intel_uxa.c
index 0dcd5d3..ef4c553 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -411,12 +411,39 @@ i830_uxa_copy(PixmapPtr dest, int src_x1, int src_y1, int dst_x1,
 	ScrnInfoPtr scrn = xf86Screens[dest->drawable.pScreen->myNum];
 	intel_screen_private *intel = intel_get_screen_private(scrn);
 	uint32_t cmd;
-	int dst_x2, dst_y2;
+	int dst_x2, dst_y2, src_x2, src_y2;
 	unsigned int dst_pitch, src_pitch;
 
 	dst_x2 = dst_x1 + w;
 	dst_y2 = dst_y1 + h;
 
+	/* XXX Fixup extents as a lamentable workaround for missing
+	 * source clipping in the upper layers.
+	 */
+	if (dst_x1 < 0)
+		src_x1 -= dst_x1, dst_x1 = 0;
+	if (dst_y1 < 0)
+		src_y1 -= dst_y1, dst_y1 = 0;
+	if (dst_x2 > dest->drawable.width)
+		dst_x2 = dest->drawable.width;
+	if (dst_y2 > dest->drawable.height)
+		dst_y2 = dest->drawable.height;
+
+	src_x2 = src_x1 + (dst_x2 - dst_x1);
+	src_y2 = src_y1 + (dst_y2 - dst_y1);
+
+	if (src_x1 < 0)
+		dst_x1 -= src_x1, src_x1 = 0;
+	if (src_y1 < 0)
+		dst_y1 -= src_y1, src_y1 = 0;
+	if (src_x2 > intel->render_source->drawable.width)
+		dst_x2 -= src_x2 - intel->render_source->drawable.width;
+	if (src_y2 > intel->render_source->drawable.height)
+		dst_y2 -= src_y2 - intel->render_source->drawable.height;
+
+	if (dst_x2 <= dst_x1 || dst_y2 <= dst_y1)
+		return;
+
 	dst_pitch = intel_pixmap_pitch(dest);
 	src_pitch = intel_pixmap_pitch(intel->render_source);
 

commit ae160d7fbfc79e78dad8702efcc55d9c0c25ff67
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Sep 10 13:19:12 2010 +0100

    shadow: Simply modify the Screen pixmap header
    
    This is a slightly less risky strategy than having to remember to update
    all pointers to the old Screen pixmap.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/intel.h b/src/intel.h
index c258a87..b816aeb 100644
--- a/src/intel.h
+++ b/src/intel.h
@@ -282,9 +282,10 @@ typedef struct intel_screen_private {
 	long GTTMapSize;
 
 	void *modes;
-	drm_intel_bo *front_buffer, *shadow_buffer;
+	drm_intel_bo *front_buffer;
 	long front_pitch, front_tiling;
-	PixmapPtr shadow_pixmap;
+	void *shadow_buffer;
+	int shadow_stride;
 	DamagePtr shadow_damage;
 
 	dri_bufmgr *bufmgr;
diff --git a/src/intel_driver.c b/src/intel_driver.c
index eab5c2c..6087f55 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -1140,22 +1140,19 @@ static Bool I830CloseScreen(int scrnIndex, ScreenPtr screen)
 		intel->front_buffer = NULL;
 	}
 
-	if (intel->shadow_pixmap) {
-		PixmapPtr pixmap = intel->shadow_pixmap;
-
-		if (intel->shadow_damage) {
-			DamageUnregister(&pixmap->drawable,
-					 intel->shadow_damage);
-			DamageDestroy(intel->shadow_damage);
-			intel->shadow_damage = NULL;
-		}
-
-		if (intel->shadow_buffer) {
+	if (intel->shadow_buffer) {
+		if (IS_I8XX(intel))
 			drm_intel_bo_unreference(intel->shadow_buffer);
-			intel->shadow_buffer = NULL;
-		}
+		else
+			free(intel->shadow_buffer);
+		intel->shadow_buffer = NULL;
+	}
 
-		intel->shadow_pixmap = NULL;
+	if (intel->shadow_damage) {
+		DamageUnregister(&screen->GetScreenPixmap(screen)->drawable,
+				 intel->shadow_damage);
+		DamageDestroy(intel->shadow_damage);
+		intel->shadow_damage = NULL;
 	}
 
 	intel_batch_teardown(scrn);
diff --git a/src/intel_uxa.c b/src/intel_uxa.c
index 706d634..0dcd5d3 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -904,8 +904,8 @@ intel_shadow_create_bo(intel_screen_private *intel,
 	bo = drm_intel_bo_alloc(intel->bufmgr, "shadow", size, 0);
 	if (bo && drm_intel_gem_bo_map_gtt(bo) == 0) {
 		char *dst = bo->virtual;
-		char *src = intel->shadow_pixmap->devPrivate.ptr;
-		int src_pitch = intel->shadow_pixmap->devKind;
+		char *src = intel->shadow_buffer;
+		int src_pitch = intel->shadow_stride;
 		int row_length = w * intel->cpp;
 		int num_rows = h;
 		src += y1 * src_pitch + x1 * intel->cpp;
@@ -961,10 +961,10 @@ intel_shadow_blt(intel_screen_private *intel)
 		dri_bo *bo;
 		int offset;
 
-		if (intel->shadow_buffer) {
+		if (IS_I8XX(intel)) {
 			bo = intel->shadow_buffer;
 			offset = box->x1 | box->y1 << 16;
-			pitch = intel->shadow_pixmap->devKind;
+			pitch = intel->shadow_stride;
 		} else {
 			bo = intel_shadow_create_bo(intel,
 						    box->x1, box->y1,
@@ -1004,16 +1004,7 @@ static void intel_shadow_create(struct intel_screen_private *intel)
 	PixmapPtr pixmap;
 	int stride;
 
-	if (IS_I8XX(intel))
-		pixmap = screen->GetScreenPixmap(screen);
-	else
-		pixmap = intel->shadow_pixmap;
-
-	if (intel->shadow_damage) {
-		DamageUnregister(&pixmap->drawable, intel->shadow_damage);
-		DamageDestroy(intel->shadow_damage);
-	}
-
+	pixmap = screen->GetScreenPixmap(screen);
 	if (IS_I8XX(intel)) {
 		dri_bo *bo;
 		int size;
@@ -1043,29 +1034,37 @@ static void intel_shadow_create(struct intel_screen_private *intel)
 			intel->shadow_buffer = bo;
 		}
 	} else {
-		if (intel->shadow_pixmap)
-			fbDestroyPixmap(intel->shadow_pixmap);
-
-		pixmap = fbCreatePixmap(screen,
-					scrn->virtualX,
-					scrn->virtualY,
-					scrn->depth,
-					0);
-
-		screen->SetScreenPixmap(pixmap);
-		stride = pixmap->devKind;
+		void *buffer;
+
+		stride = intel->cpp*scrn->virtualX;
+		buffer = malloc(stride * scrn->virtualY);
+
+		if (buffer && screen->ModifyPixmapHeader(pixmap,
+							 scrn->virtualX,
+							 scrn->virtualY,
+							 -1, -1,
+							 stride,
+							 buffer)) {
+			if (intel->shadow_buffer)
+				free(intel->shadow_buffer);
+
+			intel->shadow_buffer = buffer;
+		} else
+			stride = intel->shadow_stride;
 	}
 
-	intel->shadow_pixmap = pixmap;
-	intel->shadow_damage = DamageCreate(NULL, NULL,
-					    DamageReportNone,
-					    TRUE,
-					    screen,
-					    intel);
-	DamageRegister(&pixmap->drawable, intel->shadow_damage);
-	DamageSetReportAfterOp(intel->shadow_damage, TRUE);
+	if (!intel->shadow_damage) {
+		intel->shadow_damage = DamageCreate(NULL, NULL,


Reply to: