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:
parent
468c3c83b4
commit
8fe5152b72
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue