diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-23 20:28:24 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-26 12:21:09 -0700 |
commit | 158a158dad26b6888dd2ebaf13e6020894475fcb (patch) | |
tree | dc16b881d00f8593a43cb520207117f3c9fa9ee9 | |
parent | 3461f8f4bc2a49fd41c408d225c592623404be91 (diff) |
Add a workaround for Ironlake errata regarding blits and other engines.
-rw-r--r-- | src/i830_uxa.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c index bbbf542a..172afe55 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) |