Mesa (staging/21.0): i965/bufmgr: fix invalid assertion
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 28 23:09:33 UTC 2021
Module: Mesa
Branch: staging/21.0
Commit: 1613152b64bf18fee13a02e9e2d9bd9c10d72f4e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1613152b64bf18fee13a02e9e2d9bd9c10d72f4e
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Wed Apr 21 22:46:52 2021 +0300
i965/bufmgr: fix invalid assertion
The idea behind this assert is that if a buffer is in
bufmgr->handle_table it's because it has been shared from i965 to the
outside. This is when we add the drm FD associated to this BO to
bo->exports.
But we also import buffer from the outside into i965 and those buffers
don't have an associated drm FD added to bo->exports.
If you import the same buffer more than once, you'll run into this
assert.
v2: Also drop assert from brw_bo_gem_create_from_name() (Ian)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: 57e4d0aa1c16d3 ("i965: fix export of GEM handles")
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10386>
(cherry picked from commit 03e97e94e791ce64a0478f369aaf6afc80cfbe8f)
---
.pick_status.json | 2 +-
src/mesa/drivers/dri/i965/brw_bufmgr.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 67359e3274d..86235a84d7d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -463,7 +463,7 @@
"description": "i965/bufmgr: fix invalid assertion",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "57e4d0aa1c16d3be36ccee4065c55901cb6fad43"
},
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 65488c85201..7b861957ffe 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -794,7 +794,6 @@ brw_bo_gem_create_from_name(struct brw_bufmgr *bufmgr,
*/
bo = hash_find_bo(bufmgr->handle_table, open_arg.handle);
if (bo) {
- assert(list_is_empty(&bo->exports));
brw_bo_reference(bo);
goto out;
}
@@ -1485,7 +1484,6 @@ brw_bo_gem_create_from_prime_internal(struct brw_bufmgr *bufmgr, int prime_fd,
*/
bo = hash_find_bo(bufmgr->handle_table, handle);
if (bo) {
- assert(list_is_empty(&bo->exports));
brw_bo_reference(bo);
goto out;
}
More information about the mesa-commit
mailing list