panfrost: Remove BO mapping from import
BOs will be mapped when needed, so there is no need to mmap BOs when importing them. Fixes crashes when exporting a non-AFBC resource and importing it back in the same context. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15818>
This commit is contained in:
parent
279eea5bda
commit
5da8c280b7
|
@ -494,8 +494,6 @@ panfrost_bo_import(struct panfrost_device *dev, int fd)
|
|||
bo->flags = PAN_BO_SHARED;
|
||||
bo->gem_handle = gem_handle;
|
||||
p_atomic_set(&bo->refcnt, 1);
|
||||
// TODO map and unmap on demand?
|
||||
panfrost_bo_mmap(bo);
|
||||
} else {
|
||||
/* bo->refcnt == 0 can happen if the BO
|
||||
* was being released but panfrost_bo_import() acquired the
|
||||
|
@ -511,7 +509,6 @@ panfrost_bo_import(struct panfrost_device *dev, int fd)
|
|||
p_atomic_set(&bo->refcnt, 1);
|
||||
else
|
||||
panfrost_bo_reference(bo);
|
||||
assert(bo->ptr.cpu);
|
||||
}
|
||||
pthread_mutex_unlock(&dev->bo_map_lock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue