xf86-video-intel: 3 commits - src/common.h src/i830_uxa.c src/i965_render.c

Eric Anholt anholt at kemper.freedesktop.org
Wed May 26 12:21:43 PDT 2010


 src/common.h      |    2 --
 src/i830_uxa.c    |   24 ++++++++++++++++++++++++
 src/i965_render.c |    9 +++++++++
 3 files changed, 33 insertions(+), 2 deletions(-)

New commits:
commit 06ebb55d308defbf8e01e30e4f994c2dd1071c40
Author: Eric Anholt <eric at anholt.net>
Date:   Sun May 23 20:33:47 2010 -0700

    Add a workaround for Ironlake errata relating to disabling the clipper.

diff --git a/src/i965_render.c b/src/i965_render.c
index ed4b4d9..843776d 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1230,6 +1230,15 @@ static void i965_emit_composite_state(ScrnInfoPtr scrn)
 			  I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
 	}
 
+	if (IS_IGDNG(intel)) {
+		/* Ironlake errata workaround: Before disabling the clipper,
+		 * you have to MI_FLUSH to get the pipeline idle.
+		 */
+		ATOMIC_BATCH(1);
+		OUT_BATCH(MI_FLUSH);
+		ADVANCE_BATCH();
+	}
+
 	{
 		int pipe_ctrl;
 		/* Pipe control */
commit 158a158dad26b6888dd2ebaf13e6020894475fcb
Author: Eric Anholt <eric at anholt.net>
Date:   Sun May 23 20:28:24 2010 -0700

    Add a workaround for Ironlake errata regarding blits and other engines.

diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index bbbf542..172afe5 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -36,6 +36,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "i830.h"
 #include "i810_reg.h"
 #include "i915_drm.h"
+#include "brw_defines.h"
 #include <string.h>
 #include <sys/mman.h>
 #include <errno.h>
@@ -80,6 +81,26 @@ const int I830PatternROP[16] = {
 
 int uxa_pixmap_index;
 
+static void
+ironlake_blt_workaround(ScrnInfoPtr scrn)
+{
+	intel_screen_private *intel = intel_get_screen_private(scrn);
+
+	/* Ironlake has a limitation that a 3D or Media command can't
+	 * be the first command after a BLT, unless it's
+	 * non-pipelined.  Instead of trying to track it and emit a
+	 * command at the right time, we just emit a dummy
+	 * non-pipelined 3D instruction after each blit.
+	 */
+
+	if (IS_IGDNG(intel)) {
+		BEGIN_BATCH(2);
+		OUT_BATCH(CMD_POLY_STIPPLE_OFFSET << 16);
+		OUT_BATCH(0);
+		ADVANCE_BATCH();
+	}
+}
+
 Bool
 i830_get_aperture_space(ScrnInfoPtr scrn, drm_intel_bo ** bo_table,
 			int num_bos)
@@ -312,6 +333,8 @@ static void i830_uxa_solid(PixmapPtr pixmap, int x1, int y1, int x2, int y2)
 		OUT_BATCH(intel->BR[16]);
 		ADVANCE_BATCH();
 	}
+
+	ironlake_blt_workaround(scrn);
 }
 
 static void i830_uxa_done_solid(PixmapPtr pixmap)
@@ -453,6 +476,7 @@ i830_uxa_copy(PixmapPtr dest, int src_x1, int src_y1, int dst_x1,
 
 		ADVANCE_BATCH();
 	}
+	ironlake_blt_workaround(scrn);
 }
 
 static void i830_uxa_done_copy(PixmapPtr dest)
commit 3461f8f4bc2a49fd41c408d225c592623404be91
Author: Eric Anholt <eric at anholt.net>
Date:   Sun Apr 18 19:14:13 2010 -0700

    Remove remaining REG_DUMPER build stuff.

diff --git a/src/common.h b/src/common.h
index bc5d722..883aaa8 100644
--- a/src/common.h
+++ b/src/common.h
@@ -75,7 +75,6 @@ I830DPRINTF_stub(const char *filename, int line, const char *function,
 #define DELAY(x) do {;} while (0)
 #endif
 
-#ifndef REG_DUMPER
 /* I830 hooks for the I810 driver setup/probe. */
 extern const OptionInfoRec *I830AvailableOptions(int chipid, int busid);
 extern void intel_init_scrn(ScrnInfoPtr scrn);
@@ -165,7 +164,6 @@ extern int I810_DEBUG;
 #define DEBUG_ALWAYS_SYNC    0x80
 #define DEBUG_VERBOSE_DRI    0x100
 #define DEBUG_VERBOSE_BIOS   0x200
-#endif /* !REG_DUMPER */
 
 /* Size of the mmio region.
  */


More information about the xorg-commit mailing list