From 03e97e94e791ce64a0478f369aaf6afc80cfbe8f Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 21 Apr 2021 22:46:52 +0300 Subject: [PATCH] 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 Fixes: 57e4d0aa1c16d3 ("i965: fix export of GEM handles") Reviewed-by: Ian Romanick Part-of: --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c index 2e5ede3930d..2c423a27dc4 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; }