diff options
author | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-11-11 09:44:13 -0800 |
---|---|---|
committer | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-11-11 09:44:13 -0800 |
commit | b76a411c86512bc13cc501e71e6a212e828ed142 (patch) | |
tree | 966139df84086a741885e5488f1ad03d33812428 /tests/gem_linear_blits.c | |
parent | 0d902cad5f95ec88c3925919215ef674ad38b398 (diff) |
gem_linear_blits: Fix blit command length
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'tests/gem_linear_blits.c')
-rw-r--r-- | tests/gem_linear_blits.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c index 326b44ed..e76de02a 100644 --- a/tests/gem_linear_blits.c +++ b/tests/gem_linear_blits.c @@ -66,6 +66,11 @@ copy(int fd, uint32_t dst, uint32_t src) batch[i++] = XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA | XY_SRC_COPY_BLT_WRITE_RGB; + if (intel_gen(intel_get_drm_devid(fd)) >= 8) + batch[i - 1] |= 8; + else + batch[i - 1] |= 6; + batch[i++] = (3 << 24) | /* 32 bits */ (0xcc << 16) | /* copy ROP */ WIDTH*4; @@ -95,6 +100,8 @@ copy(int fd, uint32_t dst, uint32_t src) reloc[1].target_handle = src; reloc[1].delta = 0; reloc[1].offset = 7 * sizeof(batch[0]); + if (intel_gen(intel_get_drm_devid(fd)) >= 8) + reloc[1].offset += sizeof(batch[0]); reloc[1].presumed_offset = 0; reloc[1].read_domains = I915_GEM_DOMAIN_RENDER;; reloc[1].write_domain = 0; |