diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-23 20:28:24 -0700 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-05-27 14:49:51 +0100 |
commit | 22e08ea34dd68f790f0015a442c6eef8bd7c4245 (patch) | |
tree | b06748167cb0a2847fdef1b5d5b33d39679f67b3 /src/i830_uxa.c | |
parent | 0d542d133a610a8dd832b561c3ccdbef19e41c2d (diff) |
Add a workaround for Ironlake errata regarding blits and other engines.
(cherry picked from commit 158a158dad26b6888dd2ebaf13e6020894475fcb)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/i830_uxa.c')
-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 bbb61698..e0445153 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) @@ -305,6 +326,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) @@ -441,6 +464,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) |