* importer/exporter wouldn't see the change we're
* doing to it.
*/
- if (!(bo->flags & (PAN_BO_IMPORTED | PAN_BO_EXPORTED)))
+ if (!(bo->flags & PAN_BO_SHARED))
newbo = panfrost_bo_create(dev, bo->size,
flags);
/* If the BO has been exported or imported we can't rely on the cached
* state, we need to call the WAIT_BO ioctl.
*/
- if (!(bo->flags & (PAN_BO_IMPORTED | PAN_BO_EXPORTED))) {
+ if (!(bo->flags & PAN_BO_SHARED)) {
/* If ->gpu_access is 0, the BO is idle, no need to wait. */
if (!bo->gpu_access)
return true;
bo->dev = dev;
bo->gpu = (mali_ptr) get_bo_offset.offset;
bo->size = lseek(fd, 0, SEEK_END);
- bo->flags = PAN_BO_DONT_REUSE | PAN_BO_IMPORTED;
+ bo->flags = PAN_BO_DONT_REUSE | PAN_BO_SHARED;
bo->gem_handle = gem_handle;
assert(bo->size > 0);
p_atomic_set(&bo->refcnt, 1);
if (ret == -1)
return -1;
- bo->flags |= PAN_BO_DONT_REUSE | PAN_BO_EXPORTED;
+ bo->flags |= PAN_BO_DONT_REUSE | PAN_BO_SHARED;
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)
+/* BO is shared across processes (imported or exported) */
+#define PAN_BO_SHARED (1 << 6)
/* GPU access flags */