[igt-dev] [PATCH i-g-t 4/6] aubdump: Support alignment of BO in execbuffer2

Jordan Justen jordan.l.justen at intel.com
Wed Feb 21 23:19:03 UTC 2018


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 tools/aubdump.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/aubdump.c b/tools/aubdump.c
index 560aa50f..aea10970 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -942,6 +942,8 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
 		if (obj->flags & EXEC_OBJECT_PINNED) {
 			bo->offset = obj->offset;
 		} else {
+			if (obj->alignment != 0)
+				offset = align_u32(offset, obj->alignment);
 			bo->offset = offset;
 			offset = align_u32(offset + bo->size + 4095, 4096);
 		}
-- 
2.16.1



More information about the igt-dev mailing list