From 8fe5152b725eefe17254b63577576276c8ea7e65 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 21 Jul 2021 12:08:14 -0700 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/iris/iris_bufmgr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index dd694921064..e5ba11f94c4 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -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; }