struct iris_bo *bo = entry ? entry->data : NULL;
if (bo) {
- assert(bo->external);
+ assert(iris_bo_is_external(bo));
assert(!bo->reusable);
/* Being non-reusable, the BO cannot be in the cache lists, but it
{
struct iris_bufmgr *bufmgr = bo->bufmgr;
- if (bo->external) {
+ if (iris_bo_is_external(bo)) {
struct hash_entry *entry;
if (bo->global_name) {
struct iris_bufmgr *bufmgr = bo->bufmgr;
/* If we know it's idle, don't bother with the kernel round trip */
- if (bo->idle && !bo->external)
+ if (bo->idle && !iris_bo_is_external(bo))
return 0;
struct drm_i915_gem_wait wait = {
int iris_bo_flink(struct iris_bo *bo, uint32_t *name);
/**
+ * Is this buffer shared with external clients (imported or exported)?
+ */
+static inline bool
+iris_bo_is_external(const struct iris_bo *bo)
+{
+ return bo->external;
+}
+
+/**
* Make a BO externally accessible.
*
* \param bo Buffer to make external
const struct isl_device *dev,
isl_surf_usage_flags_t usage)
{
- return isl_mocs(dev, usage, bo && bo->external);
+ return isl_mocs(dev, usage, bo && iris_bo_is_external(bo));
}
struct iris_format_info iris_format_for_usage(const struct intel_device_info *,