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

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



Rebased ref, commits from common ancestor:
commit 2841a4cd8c6c64fdf4b2203ab73b57b38a50f651
Author: Carl Worth <cworth@cworth.org>
Date:   Mon Sep 28 20:03:11 2009 -0700

    Increment version to 2.9.0
    
    And add a reminder to RELEASING that the incremented version number
    needs to be committed, (since I forgot to do this with 2.8.99.902).

diff --git a/RELEASING b/RELEASING
index e32ecf6..afc9f43 100644
--- a/RELEASING
+++ b/RELEASING
@@ -19,7 +19,8 @@ The process for releasing a new tarball is as follows:
 3. Update your module version (usually found in configure.ac)
 
 	$ vi configure.ac # bump version
-        $ git push origin # make sure you're on the release branch
+	$ git commit
+	$ git push origin # make sure you're on the release branch
 
 4. Verify your module builds
 
diff --git a/configure.ac b/configure.ac
index becd260..7d80c35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-intel],
-        2.8.99.902,
+        2.9.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-intel)
 

commit a790aff4fef7d0c86b7b9c0da4afdc9c0aba6636
Author: Carl Worth <cworth@cworth.org>
Date:   Mon Sep 28 20:02:28 2009 -0700

    NEWS: Add notes for the 2.9.0 release.
    
    Just renamed notes as from 2.8.99.902.

diff --git a/NEWS b/NEWS
index 6b1f3b2..e0033e2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,16 +1,16 @@
-Snapshot 2.8.99.902 (2009-09-22)
-================================
-This is expected to be the final release candidate for the upcoming
-2.9.0 release. If there are no serious problems discovered in this
-release candidate then the same code will become 2.9.0 soon. So please
-let us know if you test this release candidate and find any problems.
+Release 2.9.0 (2009-09-28)
+==========================
+We are pleased to announce the 2.9.0 release of the xf86-video-intel
+driver. (If you have been following along at home, this release is
+identical to the 2.8.99.902 release candidate other than the version
+number).
 
-New features in 2.8.99.902 compared to 2.8
-------------------------------------------
+New features in 2.9 compared to 2.8
+-----------------------------------
 * Support for the B43 chipset.
 
-Major fixes in 2.8.99.902 compared to 2.8.0
--------------------------------------------
+Major fixes in 2.9.0 compared to 2.8.0
+--------------------------------------
 * Multiple fixes to make the driver stable for 8xx chipsets, (855GM,
   865G, etc.). The 2.8 driver series was extremely unstable with many
   of these chipsets.

commit a92bbcc94904684e7709b3ddaad82bc04607af26
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Sep 22 17:08:23 2009 -0700

    Increment version to 2.8.99.902

diff --git a/configure.ac b/configure.ac
index e9d89af..becd260 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-intel],
-        2.8.99.901,
+        2.8.99.902,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-intel)
 

commit ae00a0923717caec6d0dad94527da26397bd12ce
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Sep 22 15:14:38 2009 -0700

    NEWS: Add notes for 2.8.99.902

diff --git a/NEWS b/NEWS
index 9bd553a..6b1f3b2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,44 @@
+Snapshot 2.8.99.902 (2009-09-22)
+================================
+This is expected to be the final release candidate for the upcoming
+2.9.0 release. If there are no serious problems discovered in this
+release candidate then the same code will become 2.9.0 soon. So please
+let us know if you test this release candidate and find any problems.
+
+New features in 2.8.99.902 compared to 2.8
+------------------------------------------
+* Support for the B43 chipset.
+
+Major fixes in 2.8.99.902 compared to 2.8.0
+-------------------------------------------
+* Multiple fixes to make the driver stable for 8xx chipsets, (855GM,
+  865G, etc.). The 2.8 driver series was extremely unstable with many
+  of these chipsets.
+
+  https://bugs.freedesktop.org/show_bug.cgi?id=22904 (and many duplicates)
+  https://bugs.freedesktop.org/show_bug.cgi?id=22947
+
+* Add support for BACKLIGHT property when using kernel modesetting
+  (KMS). This allows backlight adjustment with programs such as
+  "xbacklight -set <percentage>" or "xrandr --set BACKLIGHT <value>".
+
+  https://bugs.freedesktop.org/show_bug.cgi?id=20963
+
+* Fix so that "xrandr --scale" works when using KMS.
+
+  https://bugs.freedesktop.org/show_bug.cgi?id=22893
+
+* Fix segfaults of X server when logging out.
+
+  https://bugs.freedesktop.org/show_bug.cgi?id=20516
+
+* Avoid falling back to software for 1-bit alpha-only masks.
+
+  https://bugs.freedesktop.org/show_bug.cgi?id=23184
+
+* Fix pixel sampling position for 8xx chipsets, (fixes some cairo-test
+  suite failures).
+
 Snapshot 2.8.99.901 (2009-09-09)
 ================================
 This is the first release candidate in preparation for the upcoming

commit 7e7db7ac530b5282b0841585959597b54fcc633b
Author: Matthias Hopf <mhopf@suse.de>
Date:   Mon Aug 17 19:24:03 2009 +0200

    Add new backlight driver "samsung".

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index cf88cd8..e8a6c01 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -99,6 +99,7 @@ static char *backlight_interfaces[] = {
     "acpi_video0",
     "fujitsu-laptop",
     "sony",
+    "samsung",
     NULL,
 };
 /*
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index aefe069..806a965 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -85,6 +85,7 @@ static char *backlight_interfaces[] = {
     "acpi_video0",
     "fujitsu-laptop",
     "sony",
+    "samsung",
     NULL,
 };
 

commit 7ae1d0dde6cef3437b67dbc21384cb179616a6c0
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Aug 31 13:51:01 2009 +0800

    Skip setting tv format property if output crtc is NULL
    
    When TV is not connected and X start, after plugging TV cable again,
    system will crash because output crtc is NULL. This patch will return,
    do not handle crtc immediately, meanwhile set value will be effective
    until user really enable output by xrandr command.
    
    Signed-off-by: Ma Ling <ling.ma@intel.com>
    Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 7082aba..df92a35 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1819,7 +1819,7 @@ i830_tv_set_property(xf86OutputPtr output, Atom property,
 	xfree (dev_priv->tv_format);
 	dev_priv->tv_format = val;
 
-	if (pI830->starting)
+	if (pI830->starting || output->crtc == NULL)
 	    return TRUE;
 
 	/* TV format change will generate new modelines, try

commit 02fe9be695f7e209944bd0f7b67950f93619feee
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Tue Sep 22 10:58:38 2009 +0800

    Check whether the DVI-I/D is connected or disconnected based on EDID
    
    When the monitor is digital type for SDVO-DVI D, there should exist the EDID. If
    there is no EDID, it should be detected as disconnected.
    
    Signe-off-by: Zhao Yakui <yakui.zhao@intel.com>

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 8f3193b..5ffe0e8 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1824,6 +1824,9 @@ i830_sdvo_detect(xf86OutputPtr output)
 	xf86MonPtr edid_mon;
 	/* Check EDID in DVI-I case */
 	edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
+	/* when there is no EDID, it should be detected as disconnected */
+	if (!edid_mon)
+	    return XF86OutputStatusDisconnected;
 	if (edid_mon && !DIGITAL(edid_mon->features.input_type)) {
 	    xfree(edid_mon);
 	    return XF86OutputStatusDisconnected;

commit 762e406d138ac80854b6a23b1078b52f6581f0d8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Sep 22 01:34:37 2009 +0100

    Revert "8xx: Fallback for any non-affine transformation."
    
    This reverts commit 505025053d66d415e1c23ac858b9238fa8541d37.
    
    In theory, the non-affine paths work -- at least for the stated test case,
    so re-enable them and avoid the slow work-around.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/i830_render.c b/src/i830_render.c
index c947699..4fa872b 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -396,17 +396,6 @@ i830_check_composite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
     if (!i830_get_dest_format(pDstPicture, &tmp1))
 	I830FALLBACK("Get Color buffer format\n");
 
-    /* There exists some code to handle non-affine transformations for
-     * 8xx, but from what we can tell, it just isn't correct. (An easy
-     * testcase is to run enlightenemt (e17), click the "e", then
-     * "settings", "settings panel", "advanced", "engine", and finally
-     * "XRender" and "Apply". After doing that, moving any window causes
-     * a GPU hang. */
-    if (!i830_transform_is_affine(pSrcPicture->transform) ||
-	!i830_transform_is_affine(pDstPicture->transform) ||
-	(pMaskPicture && !i830_transform_is_affine (pMaskPicture->transform)))
-	I830FALLBACK("Non-affine transformation\n");
-
     return TRUE;
 }
 

commit 2cc1f3cb6034dddd65b3781b0cde7dff4ac1e803
Author: Keith Packard <keithp@keithp.com>
Date:   Sat Sep 19 17:30:57 2009 -0700

    i8xx: Format projective texture coordinates correctly.
    
    Projective texture coordinates must be delivered as TEXCOORDFMT_3D
    using TEXCOORDTYPE_HOMOGENOUS. This meant selecting the correct type
    in i830_texture_setup, the correct format in i830_emit_composite_state
    and sending only 3 coordinates in i830_emit_composite_primitive.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    [ickle: tweaked to fix up a couple of use-before-initialised]
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/i830_reg.h b/src/i830_reg.h
index 7a8df9f..a8b82a6 100644
--- a/src/i830_reg.h
+++ b/src/i830_reg.h
@@ -523,7 +523,7 @@
 #define VFT0_XYZW_MASK          (7<<1)
 
 /* _3DSTATE_VERTEX_FORMAT_2, p206 */
-#define _3DSTATE_VFT1_CMD	(CMD_3D|(0x0a<<24))
+#define _3DSTATE_VERTEX_FORMAT_2_CMD	(CMD_3D|(0x0a<<24))
 #define VFT1_TEX7_FMT(x)	((x)<<14)
 #define VFT1_TEX6_FMT(x)	((x)<<12)
 #define VFT1_TEX5_FMT(x)	((x)<<10)
diff --git a/src/i830_render.c b/src/i830_render.c
index 2c95601..c947699 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -276,12 +276,18 @@ i830_texture_setup(PicturePtr pPict, PixmapPtr pPix, int unit)
     I830Ptr pI830 = I830PTR(pScrn);
     uint32_t format, pitch, filter;
     uint32_t wrap_mode;
+    uint32_t texcoordtype;
 
     pitch = intel_get_pixmap_pitch(pPix);
     pI830->scale_units[unit][0] = pPix->drawable.width;
     pI830->scale_units[unit][1] = pPix->drawable.height;
     pI830->transform[unit] = pPict->transform;
 
+    if (i830_transform_is_affine(pI830->transform[unit]))
+	texcoordtype = TEXCOORDTYPE_CARTESIAN;
+    else
+	texcoordtype = TEXCOORDTYPE_HOMOGENEOUS;
+
     format = i8xx_get_card_format(pPict);
 
     switch (pPict->repeatType) {
@@ -334,7 +340,7 @@ i830_texture_setup(PicturePtr pPict, PixmapPtr pPix, int unit)
 	OUT_BATCH(0); /* default color */
 	OUT_BATCH(_3DSTATE_MAP_COORD_SET_CMD | TEXCOORD_SET(unit) |
 		  ENABLE_TEXCOORD_PARAMS | TEXCOORDS_ARE_NORMAL |
-		  TEXCOORDTYPE_CARTESIAN | ENABLE_ADDR_V_CNTL |
+		  texcoordtype | ENABLE_ADDR_V_CNTL |
 		  TEXCOORD_ADDR_V_MODE(wrap_mode) |
 		  ENABLE_ADDR_U_CNTL | TEXCOORD_ADDR_U_MODE(wrap_mode));
 	/* map texel stream */
@@ -537,13 +543,14 @@ i830_emit_composite_state(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     uint32_t vf2;
+    uint32_t texcoordfmt = 0;
 
     pI830->needs_render_state_emit = FALSE;
 
     IntelEmitInvarientState(pScrn);
     pI830->last_3d = LAST_3D_RENDER;
 
-    BEGIN_BATCH(22);
+    BEGIN_BATCH(21);
 
     OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
     OUT_BATCH(BUF_3D_ID_COLOR_BACK| BUF_3D_USE_FENCE |
@@ -570,19 +577,17 @@ i830_emit_composite_state(ScrnInfoPtr pScrn)
 	vf2 = 2 << 12; /* 2 texture coord sets */
     else
 	vf2 = 1 << 12;
-    OUT_BATCH(vf2); /* TEXCOORDFMT_2D */
+    OUT_BATCH(vf2); /* number of coordinate sets */
     OUT_BATCH(S3_CULLMODE_NONE | S3_VERTEXHAS_XY);
     OUT_BATCH(S8_ENABLE_COLOR_BLEND | S8_BLENDFUNC_ADD | pI830->s8_blendctl |
 	      S8_ENABLE_COLOR_BUFFER_WRITE);
 
     OUT_BATCH(_3DSTATE_INDPT_ALPHA_BLEND_CMD | DISABLE_INDPT_ALPHA_BLEND);
-    OUT_BATCH(0);
 
     OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 |
 	      LOAD_TEXTURE_BLEND_STAGE(0)|1);
     OUT_BATCH(pI830->cblend);
     OUT_BATCH(pI830->ablend);
-    OUT_BATCH(0);
 
     OUT_BATCH(_3DSTATE_ENABLES_1_CMD | DISABLE_LOGIC_OP |
 	      DISABLE_STENCIL_TEST | DISABLE_DEPTH_BIAS |
@@ -593,6 +598,19 @@ i830_emit_composite_state(ScrnInfoPtr pScrn)
 	      DISABLE_STENCIL_WRITE | ENABLE_TEX_CACHE |
 	      DISABLE_DITHER | ENABLE_COLOR_WRITE |
 	      DISABLE_DEPTH_WRITE);
+
+    if (i830_transform_is_affine(pI830->render_src_picture->transform))
+	texcoordfmt |= (TEXCOORDFMT_2D << 0);
+    else
+	texcoordfmt |= (TEXCOORDFMT_3D << 0);
+    if (pI830->render_mask) {
+	if (i830_transform_is_affine(pI830->render_mask_picture->transform))
+	    texcoordfmt |= (TEXCOORDFMT_2D << 2);
+	else
+	    texcoordfmt |= (TEXCOORDFMT_3D << 2);
+    }
+    OUT_BATCH(_3DSTATE_VERTEX_FORMAT_2_CMD | texcoordfmt);
+
     ADVANCE_BATCH();
 
     i830_texture_setup(pI830->render_src_picture, pI830->render_src, 0);
@@ -665,7 +683,7 @@ i830_emit_composite_primitive(PixmapPtr pDst,
 						     &src_w[2]))
 		return;
 
-	    per_vertex += 4;    /* src x/y/z/w */
+	    per_vertex += 3;    /* src x/y/w */
 	}
     }
 
@@ -713,7 +731,7 @@ i830_emit_composite_primitive(PixmapPtr pDst,
 						     &mask_w[2]))
 		return;
 
-	    per_vertex += 4;	/* mask x/y/z/w */
+	    per_vertex += 3;	/* mask x/y/w */
 	}
     }
 
@@ -727,14 +745,12 @@ i830_emit_composite_primitive(PixmapPtr pDst,
     OUT_BATCH_F(src_x[2] / pI830->scale_units[0][0]);
     OUT_BATCH_F(src_y[2] / pI830->scale_units[0][1]);
     if (!is_affine_src) {
-	OUT_BATCH_F(0.0);
 	OUT_BATCH_F(src_w[2]);
     }
     if (pI830->render_mask) {
 	OUT_BATCH_F(mask_x[2] / pI830->scale_units[1][0]);
 	OUT_BATCH_F(mask_y[2] / pI830->scale_units[1][1]);
 	if (!is_affine_mask) {
-	    OUT_BATCH_F(0.0);
 	    OUT_BATCH_F(mask_w[2]);
 	}
     }
@@ -744,14 +760,12 @@ i830_emit_composite_primitive(PixmapPtr pDst,
     OUT_BATCH_F(src_x[1] / pI830->scale_units[0][0]);
     OUT_BATCH_F(src_y[1] / pI830->scale_units[0][1]);
     if (!is_affine_src) {
-	OUT_BATCH_F(0.0);
 	OUT_BATCH_F(src_w[1]);
     }
     if (pI830->render_mask) {
 	OUT_BATCH_F(mask_x[1] / pI830->scale_units[1][0]);
 	OUT_BATCH_F(mask_y[1] / pI830->scale_units[1][1]);
 	if (!is_affine_mask) {
-	    OUT_BATCH_F(0.0);
 	    OUT_BATCH_F(mask_w[1]);
 	}
     }
@@ -761,14 +775,12 @@ i830_emit_composite_primitive(PixmapPtr pDst,
     OUT_BATCH_F(src_x[0] / pI830->scale_units[0][0]);
     OUT_BATCH_F(src_y[0] / pI830->scale_units[0][1]);
     if (!is_affine_src) {
-	OUT_BATCH_F(0.0);
 	OUT_BATCH_F(src_w[0]);
     }
     if (pI830->render_mask) {
 	OUT_BATCH_F(mask_x[0] / pI830->scale_units[1][0]);
 	OUT_BATCH_F(mask_y[0] / pI830->scale_units[1][1]);
 	if (!is_affine_mask) {
-	    OUT_BATCH_F(0.0);
 	    OUT_BATCH_F(mask_w[0]);
 	}
     }

commit 00e8de212b46a243f243b437b7eb866315ab89b3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Sep 21 22:14:21 2009 +0100

    Check the correct Picture for error during creation.

diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 8eee6a6..4850185 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -361,7 +361,7 @@ uxa_picture_from_a1_pixman_image (ScreenPtr pScreen,
 			  PictureMatchFormat (pScreen, 1, PICT_a1),
 			  0, 0, serverClient, &error);
     FreeScratchPixmapHeader (pPixmap);
-    if (!pPicture) {
+    if (!pSrc) {
 	FreePicture (pPicture, 0);
 	return 0;
     }

commit bd817e2d733dfdb1140874b06595ccd1ef39159b
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Sep 21 17:21:17 2009 -0700

    Split i915/i830 composite_emit_primitive into two functions.
    
    The i915 and i830 take similar but different data when emitting the
    primitives, instead of trying to share code here, just split this
    apart and avoid potentially breaking things later on.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/src/i830.h b/src/i830.h
index d597308..009641a 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -791,9 +791,6 @@ i830_transform_is_affine (PictTransformPtr t);
 
 void i830_composite(PixmapPtr pDst, int srcX, int srcY,
 		    int maskX, int maskY, int dstX, int dstY, int w, int h);
-void i830_emit_composite_primitive(PixmapPtr pDst, int srcX, int srcY,
-				   int maskX, int maskY, int dstX, int dstY,
-				   int w, int h);
 void i830_done_composite(PixmapPtr pDst);
 /* i915_render.c */
 Bool i915_check_composite(int op, PicturePtr pSrc, PicturePtr pMask,
diff --git a/src/i830_render.c b/src/i830_render.c
index 8213e29..2c95601 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -604,9 +604,9 @@ i830_emit_composite_state(ScrnInfoPtr pScrn)
 
 /* Emit the vertices for a single composite rectangle.
  *
- * This function is shared between i830 and i915 generation code.
+ * This function is no longer shared between i830 and i915 generation code.
  */
-void
+static void
 i830_emit_composite_primitive(PixmapPtr pDst,
 			      int srcX, int srcY,
 			      int maskX, int maskY,
diff --git a/src/i915_render.c b/src/i915_render.c
index 9d5d425..a4c2768 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -547,6 +547,182 @@ i915_emit_composite_setup(ScrnInfoPtr pScrn)
     FS_END();
 }
 
+
+
+/* Emit the vertices for a single composite rectangle.
+ *
+ * This function is no longer shared between i830 and i915 generation code.
+ */
+static void
+i915_emit_composite_primitive(PixmapPtr pDst,
+			      int srcX, int srcY,
+			      int maskX, int maskY,
+			      int dstX, int dstY,
+			      int w, int h)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+    I830Ptr pI830 = I830PTR(pScrn);
+    Bool is_affine_src, is_affine_mask = TRUE;
+    int per_vertex, num_floats;
+    float src_x[3], src_y[3], src_w[3], mask_x[3], mask_y[3], mask_w[3];
+
+    per_vertex = 2; /* dest x/y */
+
+    {
+	float x = srcX + pI830->src_coord_adjust;
+	float y = srcY + pI830->src_coord_adjust;
+
+	is_affine_src = i830_transform_is_affine (pI830->transform[0]);
+	if (is_affine_src) {
+	    if (!i830_get_transformed_coordinates(x, y,
+						  pI830->transform[0],
+						  &src_x[0], &src_y[0]))
+		return;
+
+	    if (!i830_get_transformed_coordinates(x, y + h,
+						  pI830->transform[0],
+						  &src_x[1], &src_y[1]))
+		return;
+
+	    if (!i830_get_transformed_coordinates(x + w, y + h,
+						  pI830->transform[0],
+						  &src_x[2], &src_y[2]))
+		return;
+
+	    per_vertex += 2;    /* src x/y */
+	} else {
+	    if (!i830_get_transformed_coordinates_3d(x, y,
+						     pI830->transform[0],
+						     &src_x[0],
+						     &src_y[0],
+						     &src_w[0]))
+		return;
+
+	    if (!i830_get_transformed_coordinates_3d(x, y + h,
+						     pI830->transform[0],
+						     &src_x[1],
+						     &src_y[1],
+						     &src_w[1]))
+		return;
+
+	    if (!i830_get_transformed_coordinates_3d(x + w, y + h,
+						     pI830->transform[0],
+						     &src_x[2],
+						     &src_y[2],
+						     &src_w[2]))
+		return;
+
+	    per_vertex += 4;    /* src x/y/z/w */
+	}
+    }
+
+    if (pI830->render_mask) {
+	float x = maskX + pI830->mask_coord_adjust;
+	float y = maskY + pI830->mask_coord_adjust;
+
+	is_affine_mask = i830_transform_is_affine (pI830->transform[1]);
+	if (is_affine_mask) {
+	    if (!i830_get_transformed_coordinates(x, y,
+						  pI830->transform[1],
+						  &mask_x[0], &mask_y[0]))
+		return;
+
+	    if (!i830_get_transformed_coordinates(x, y + h,
+						  pI830->transform[1],
+						  &mask_x[1], &mask_y[1]))
+		return;
+
+	    if (!i830_get_transformed_coordinates(x + w, y + h,
+						  pI830->transform[1],
+						  &mask_x[2], &mask_y[2]))
+		return;
+
+	    per_vertex += 2;	/* mask x/y */
+	} else {
+	    if (!i830_get_transformed_coordinates_3d(x, y,
+						     pI830->transform[1],
+						     &mask_x[0],
+						     &mask_y[0],
+						     &mask_w[0]))
+		return;
+
+	    if (!i830_get_transformed_coordinates_3d(x, y + h,
+						     pI830->transform[1],
+						     &mask_x[1],
+						     &mask_y[1],
+						     &mask_w[1]))
+		return;
+
+	    if (!i830_get_transformed_coordinates_3d(x + w, y + h,
+						     pI830->transform[1],
+						     &mask_x[2],
+						     &mask_y[2],
+						     &mask_w[2]))
+		return;
+
+	    per_vertex += 4;	/* mask x/y/z/w */
+	}
+    }
+
+    num_floats = 3 * per_vertex;
+
+    BEGIN_BATCH(1 + num_floats);
+
+    OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST | (num_floats-1));
+    OUT_BATCH_F(pI830->dst_coord_adjust + dstX + w);
+    OUT_BATCH_F(pI830->dst_coord_adjust + dstY + h);
+    OUT_BATCH_F(src_x[2] / pI830->scale_units[0][0]);
+    OUT_BATCH_F(src_y[2] / pI830->scale_units[0][1]);
+    if (!is_affine_src) {
+	OUT_BATCH_F(0.0);
+	OUT_BATCH_F(src_w[2]);
+    }
+    if (pI830->render_mask) {
+	OUT_BATCH_F(mask_x[2] / pI830->scale_units[1][0]);
+	OUT_BATCH_F(mask_y[2] / pI830->scale_units[1][1]);
+	if (!is_affine_mask) {
+	    OUT_BATCH_F(0.0);
+	    OUT_BATCH_F(mask_w[2]);
+	}
+    }
+
+    OUT_BATCH_F(pI830->dst_coord_adjust + dstX);
+    OUT_BATCH_F(pI830->dst_coord_adjust + dstY + h);
+    OUT_BATCH_F(src_x[1] / pI830->scale_units[0][0]);
+    OUT_BATCH_F(src_y[1] / pI830->scale_units[0][1]);
+    if (!is_affine_src) {
+	OUT_BATCH_F(0.0);
+	OUT_BATCH_F(src_w[1]);
+    }
+    if (pI830->render_mask) {
+	OUT_BATCH_F(mask_x[1] / pI830->scale_units[1][0]);
+	OUT_BATCH_F(mask_y[1] / pI830->scale_units[1][1]);
+	if (!is_affine_mask) {
+	    OUT_BATCH_F(0.0);
+	    OUT_BATCH_F(mask_w[1]);
+	}
+    }
+
+    OUT_BATCH_F(pI830->dst_coord_adjust + dstX);
+    OUT_BATCH_F(pI830->dst_coord_adjust + dstY);
+    OUT_BATCH_F(src_x[0] / pI830->scale_units[0][0]);
+    OUT_BATCH_F(src_y[0] / pI830->scale_units[0][1]);
+    if (!is_affine_src) {
+	OUT_BATCH_F(0.0);
+	OUT_BATCH_F(src_w[0]);
+    }
+    if (pI830->render_mask) {
+	OUT_BATCH_F(mask_x[0] / pI830->scale_units[1][0]);
+	OUT_BATCH_F(mask_y[0] / pI830->scale_units[1][1]);
+	if (!is_affine_mask) {
+	    OUT_BATCH_F(0.0);
+	    OUT_BATCH_F(mask_w[0]);
+	}
+    }
+
+    ADVANCE_BATCH();
+}
+
 void
 i915_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	       int dstX, int dstY, int w, int h)
@@ -559,7 +735,7 @@ i915_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
     if (pI830->i915_render_state.needs_emit)
 	i915_emit_composite_setup(pScrn);
 
-    i830_emit_composite_primitive(pDst, srcX, srcY, maskX, maskY, dstX, dstY,
+    i915_emit_composite_primitive(pDst, srcX, srcY, maskX, maskY, dstX, dstY,
 				  w, h);
 
     intel_batch_end_atomic(pScrn);

commit 5e80297d088e8cdbf66d765f7d252dab66c8df86
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Sep 18 21:05:23 2009 -0700

    Remove DGA support from the driver.
    
    The xf86DiDGA code required that the scanout buffer always be
    mappable, stay be at a fixed address in the aperture and have a
    constant size. With frame buffer resizing, the latter two are no
    longer true, and with KMS, we'd really prefer to not allow the former.
    
    The only option available to the driver is to completely disable DGA
    as the modes code has internal calls to the xf86DiDGA code when
    fetching new modes from the hardware.
    
    A fix for the DiDGA code will be added to the X server which will
    automatically initialize DGA for mode switching and input, but not
    frame buffer access, and not require any driver cooperation.
    
    Thus, the correct solution is for the driver to not call xf86DiDGAInit
    at all. For old servers, this eliminates a potential catastrophic
    problem where random memory is written by the X server. New servers
    will get the DIX-based behaviour automatically.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 4eb0255..316a1fa 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2708,11 +2708,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
    xf86SetBlackWhitePixels(pScreen);
 
-#ifdef XFreeXDGA
-   if (!pI830->use_drm_mode)
-       xf86DiDGAInit (pScreen, pI830->LinearAddr + pScrn->fbOffset);
-#endif
-
    if (!I830AccelInit(pScreen)) {
       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		 "Hardware acceleration initialization failed\n");

commit 4758311842a16600287c8f9f77ce0af1a31b9264
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Sep 18 20:59:52 2009 -0700

    Remove vestigial internal rotation which broke KMS DGA/VidMode modesetting.
    
    Pre-2.0, the driver supported rotation internally, rather than relying
    on the X server rotation support. The last piece of this dealt with
    rotating the mouse coordinates and also tried to preserve rotation
    across DGA/VidModeExtension modesetting requests.
    
    That latter bit of code broke under KMS as the rotation value was
    never initialized, and when set to zero would create an invalid
    configuration. This would confuse xrandr which would bail before
    making any changes, leaving the user without a way to recover.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/src/i830.h b/src/i830.h
index c3b0d02..d597308 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -395,8 +395,7 @@ typedef struct _I830Rec {
 #endif
 
    XF86ModReqInfo shadowReq; /* to test for later libshadow */
-   Rotation rotation;
-   void (*PointerMoved)(int, int, int);
+
    CreateScreenResourcesProcPtr    CreateScreenResources;
 
    i830_memory *power_context;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 2863e45..4eb0255 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1359,9 +1359,6 @@ i830_user_modesetting_init(ScrnInfoPtr pScrn)
     }
     RestoreHWState(pScrn);
 
-    /* XXX This should go away, replaced by xf86Crtc.c support for it */
-    pI830->rotation = RR_Rotate_0;
-
     pI830->stolen_size = I830DetectMemory(pScrn);
 
     return TRUE;
@@ -2133,33 +2130,6 @@ RestoreHWState(ScrnInfoPtr pScrn)
    return TRUE;
 }
 
-static void
-I830PointerMoved(int index, int x, int y)
-{
-   ScrnInfoPtr pScrn = xf86Screens[index];
-   I830Ptr pI830 = I830PTR(pScrn);
-   int newX = x, newY = y;
-
-   switch (pI830->rotation) {
-      case RR_Rotate_0:
-         break;
-      case RR_Rotate_90:
-         newX = y;
-         newY = pScrn->pScreen->width - x - 1;
-         break;
-      case RR_Rotate_180:
-         newX = pScrn->pScreen->width - x - 1;
-         newY = pScrn->pScreen->height - y - 1;
-         break;
-      case RR_Rotate_270:
-         newX = pScrn->pScreen->height - y - 1;
-         newY = x;
-         break;
-   }
-
-   (*pI830->PointerMoved)(index, newX, newY);
-}
-
 /**
  * Intialiazes the hardware for the 3D pipeline use in the 2D driver.
  *
@@ -2830,11 +2800,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering: Not available\n");
 #endif
 
-
-   /* Wrap pointer motion to flip touch screen around */
-   pI830->PointerMoved = pScrn->PointerMoved;
-   pScrn->PointerMoved = I830PointerMoved;
-
    if (serverGeneration == 1)
       xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
 
@@ -3086,9 +3051,8 @@ static Bool
 I830SwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
 {
    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
-   I830Ptr pI830 = I830PTR(pScrn);
 
-   return xf86SetSingleMode (pScrn, mode, pI830->rotation);
+   return xf86SetSingleMode (pScrn, mode, RR_Rotate_0);
 }
 
 static Bool
@@ -3142,7 +3106,6 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
 
    xf86GARTCloseScreen(scrnIndex);
 
-   pScrn->PointerMoved = pI830->PointerMoved;
    pScrn->vtSema = FALSE;
    pI830->closing = FALSE;
    return TRUE;
diff --git a/src/i830_video.c b/src/i830_video.c
index 9fb0b56..47c026d 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2751,10 +2751,6 @@ I830AllocateSurface(ScrnInfoPtr pScrn,
 	    return BadAlloc;
     }
 
-    /* What to do when rotated ?? */
-    if (pI830->rotation != RR_Rotate_0)
-	return BadAlloc;
-
     if (!(surface->pitches = xalloc(sizeof(int))))
 	return BadAlloc;
     if (!(surface->offsets = xalloc(sizeof(int)))) {

commit 505025053d66d415e1c23ac858b9238fa8541d37
Author: Carl Worth <cworth@cworth.org>
Date:   Mon Sep 21 13:50:09 2009 -0700

    8xx: Fallback for any non-affine transformation.
    
    There are definitely bugs in the 8xx code dealing with non-affine
    transformations. Disable that code for now to get things working.
    
    Fixes bug #22947 ([855GM, xf86-video-intel-2.8.0] "Freeze" when RENDER extension is being used)

diff --git a/src/i830_render.c b/src/i830_render.c
index b9bbbdb..8213e29 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -390,6 +390,17 @@ i830_check_composite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
     if (!i830_get_dest_format(pDstPicture, &tmp1))
 	I830FALLBACK("Get Color buffer format\n");
 
+    /* There exists some code to handle non-affine transformations for
+     * 8xx, but from what we can tell, it just isn't correct. (An easy
+     * testcase is to run enlightenemt (e17), click the "e", then
+     * "settings", "settings panel", "advanced", "engine", and finally
+     * "XRender" and "Apply". After doing that, moving any window causes
+     * a GPU hang. */
+    if (!i830_transform_is_affine(pSrcPicture->transform) ||
+	!i830_transform_is_affine(pDstPicture->transform) ||
+	(pMaskPicture && !i830_transform_is_affine (pMaskPicture->transform)))
+	I830FALLBACK("Non-affine transformation\n");
+
     return TRUE;
 }
 

commit b4d29452b929a3ef224d3625e4bc66b787c5edb7
Author: Zhenyu Wang <zhenyuw@linux.intel.com>
Date:   Mon Sep 21 15:28:09 2009 +0800

    More dumps for Arrandale LVDS
    
    Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>

diff --git a/src/i810_reg.h b/src/i810_reg.h
index f8c6fb1..191ddb2 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -3068,9 +3068,10 @@ typedef enum {
 #define PFB_CTL_1		0x68880
 #define  PF_ENABLE		(1<<31)
 
-/* CPU panel fitter */
-#define PFA_CTRL_1		0x68080
-#define PFB_CTRL_1		0x68880
+#define PFA_WIN_POS		0x68070
+#define PFB_WIN_POS		0x68870
+#define PFA_WIN_SIZE		0x68074
+#define PFB_WIN_SIZE		0x68874
 
 /* legacy palette */
 #define LGC_PALETTE_A		0x4a000
@@ -3404,6 +3405,7 @@ typedef enum {
 
 #define HDMIC	0xe1150
 #define HDMID	0xe1160
+#define PCH_LVDS		0xe1180
 
 #define AUD_CONFIG              0x62000
 #define AUD_DEBUG               0x62010
diff --git a/src/i830_debug.c b/src/i830_debug.c
index cf3f439..eae141b 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -1213,6 +1213,17 @@ DEBUGSTRING(igdng_debug_panel_fitting)
 	    val & (1 << 20) ? "field 0" : "field 1");
 }
 
+DEBUGSTRING(igdng_debug_pf_win)
+{
+    int a, b;
+
+    a = (val >> 16) & 0x1fff;
+    b = val & 0xfff;
+
+    return XNFprintf("%d, %d", a, b);
+}
+
+
 static struct i830SnapshotRec igdng_snapshot[] = {
     DEFINEREG2(CPU_VGACNTRL, i830_debug_vgacntrl),
     DEFINEREG(DIGITAL_PORT_HOTPLUG_CNTRL),
@@ -1284,8 +1295,12 @@ static struct i830SnapshotRec igdng_snapshot[] = {
     DEFINEREG2(PIPEB_LINK_M2, igdng_debug_n),
     DEFINEREG2(PIPEB_LINK_N2, igdng_debug_n),
 
-    DEFINEREG2(PFA_CTRL_1, igdng_debug_panel_fitting),
-    DEFINEREG2(PFB_CTRL_1, igdng_debug_panel_fitting),
+    DEFINEREG2(PFA_CTL_1, igdng_debug_panel_fitting),
+    DEFINEREG2(PFB_CTL_1, igdng_debug_panel_fitting),
+    DEFINEREG2(PFA_WIN_POS, igdng_debug_pf_win),
+    DEFINEREG2(PFB_WIN_POS, igdng_debug_pf_win),
+    DEFINEREG2(PFA_WIN_SIZE, igdng_debug_pf_win),
+    DEFINEREG2(PFB_WIN_SIZE, igdng_debug_pf_win),
 
     /* PCH */
 
@@ -1361,6 +1376,7 @@ static struct i830SnapshotRec igdng_snapshot[] = {
     DEFINEREG(HDMIB),
     DEFINEREG(HDMIC),
     DEFINEREG(HDMID),
+    DEFINEREG2(PCH_LVDS, i830_debug_lvds),
 };
 #define NUM_IGDNG_SNAPSHOTREGS (sizeof(igdng_snapshot) / sizeof(igdng_snapshot[0]))
 #undef DEFINEREG

commit 57fc09cef28bad2e3e8455b93ef2927118f8a3a3


Reply to: