Mesa (main): iris: Allow SET_DOMAIN to fail when allocating new GEM objects
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 12 20:22:45 UTC 2021
Module: Mesa
Branch: main
Commit: 8fe5152b725eefe17254b63577576276c8ea7e65
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8fe5152b725eefe17254b63577576276c8ea7e65
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Wed Jul 21 12:08:14 2021 -0700
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 at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12044>
---
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;
}
More information about the mesa-commit
mailing list