summaryrefslogtreecommitdiff
path: root/tools/aubdump.c
diff options
context:
space:
mode:
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>2016-07-08 17:25:53 -0700
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>2016-07-08 17:28:06 -0700
commit2603b98cab0378f791e4f0d8049dc3cd9b54c209 (patch)
tree14f880b19cd4d25f4be1845aa3c36ccad99d0bbf /tools/aubdump.c
parente28120d10e929953c4c14c376c023ca670baa889 (diff)
aubdump: Support softpin bos
Diffstat (limited to 'tools/aubdump.c')
-rw-r--r--tools/aubdump.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/aubdump.c b/tools/aubdump.c
index e7f63e7b..8635d095 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -356,8 +356,12 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
obj = &exec_objects[i];
bo = get_bo(obj->handle);
- bo->offset = offset;
- offset = align_u32(offset + bo->size + 4095, 4096);
+ if (obj->flags & EXEC_OBJECT_PINNED) {
+ bo->offset = obj->offset;
+ } else {
+ bo->offset = offset;
+ offset = align_u32(offset + bo->size + 4095, 4096);
+ }
if (bo->map == NULL)
bo->map = gem_mmap(fd, obj->handle, 0, bo->size);