mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 19:00:13 +01:00
nouveau/winsys: Take a reference to BOs found in the cache
Fixes: c370260a8f ("nouveau/winsys: Add dma-buf import support")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
This commit is contained in:
parent
d63f015d0b
commit
19b143b7bc
1 changed files with 5 additions and 2 deletions
|
|
@ -269,8 +269,11 @@ nouveau_ws_bo_from_dma_buf_locked(struct nouveau_ws_device *dev, int fd)
|
|||
|
||||
struct hash_entry *entry =
|
||||
_mesa_hash_table_search(dev->bos, (void *)(uintptr_t)handle);
|
||||
if (entry != NULL)
|
||||
return entry->data;
|
||||
if (entry != NULL) {
|
||||
struct nouveau_ws_bo *bo = entry->data;
|
||||
nouveau_ws_bo_ref(bo);
|
||||
return bo;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we got here, no BO exists for the retrieved handle. If we error
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue