Will be useful to make the ioctl(WAIT_BO) call conditional on BOs that
are not exported/imported (meaning that all GPU accesses are known
by the context).
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
bo->gem_handle = gem_handle;
bo->gpu = (mali_ptr) get_bo_offset.offset;
bo->size = lseek(fd, 0, SEEK_END);
- bo->flags |= PAN_BO_DONT_REUSE;
+ bo->flags |= PAN_BO_DONT_REUSE | PAN_BO_IMPORTED;
assert(bo->size > 0);
pipe_reference_init(&bo->reference, 1);
if (ret == -1)
return -1;
- bo->flags |= PAN_BO_DONT_REUSE;
+ bo->flags |= PAN_BO_DONT_REUSE | PAN_BO_EXPORTED;
return args.fd;
}
* let the BO logic know about this contraint. */
#define PAN_BO_DONT_REUSE (1 << 5)
+/* BO has been imported */
+#define PAN_BO_IMPORTED (1 << 6)
+
+/* BO has been exported */
+#define PAN_BO_EXPORTED (1 << 7)
+
/* GPU access flags */
/* BO is either shared (can be accessed by more than one GPU batch) or private