bo->size = size;
bo->handle = handle;
bo->iova = bo->funcs->iova(bo);
+ bo->flags = FD_RELOC_FLAGS_INIT;
p_atomic_set(&bo->refcnt, 1);
list_inithead(&bo->list);
{
uint32_t flags = DRM_FREEDRENO_GEM_GPUREADONLY;
struct fd_bo *bo = bo_new(dev, size, flags, &dev->ring_cache);
- if (bo)
+ if (bo) {
bo->bo_reuse = RING_CACHE;
- fd_bo_set_name(bo, "cmdstream");
+ bo->flags |= FD_RELOC_DUMP;
+ fd_bo_set_name(bo, "cmdstream");
+ }
return bo;
}
return bo;
}
+void
+fd_bo_mark_for_dump(struct fd_bo *bo)
+{
+ bo->flags |= FD_RELOC_DUMP;
+}
+
uint64_t fd_bo_get_iova(struct fd_bo *bo)
{
+ /* ancient kernels did not support this */
+ assert(bo->iova != 0);
return bo->iova;
}
uint32_t fd_bo_handle(struct fd_bo *bo)
{
+ bo->bo_reuse = NO_CACHE;
return bo->handle;
}