iris: Allow SET_DOMAIN to fail when allocating new GEM objects

We're just using this as a minor optimization to allocate pages for
buffers up front outside of some kernel locking.  It's not essential.
The SET_DOMAIN ioctl may be going away in the future, so let's be a
bit cautious and try it but not fail.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044>
This commit is contained in:
Kenneth Graunke 2021-07-21 12:08:14 -07:00 committed by Jason Ekstrand
parent 468c3c83b4
commit 8fe5152b72
1 changed files with 1 additions and 4 deletions

View File

@ -587,10 +587,7 @@ alloc_fresh_bo(struct iris_bufmgr *bufmgr, uint64_t bo_size, bool local)
.write_domain = 0,
};
if (intel_ioctl(bo->bufmgr->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &sd) != 0) {
bo_free(bo);
return NULL;
}
intel_ioctl(bo->bufmgr->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &sd);
return bo;
}