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@intel.com>
Fixes: 57e4d0aa1c ("i965: fix export of GEM handles")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10386>
This commit is contained in:
committed by
Marge Bot
parent
eb6d99014f
commit
03e97e94e7
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user