mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-09 03:58:05 +02:00
nouveau: fix pin for buffers created with bo_wrap
This commit is contained in:
parent
4179c5f0a6
commit
f257201c11
1 changed files with 3 additions and 1 deletions
|
|
@ -752,11 +752,13 @@ nouveau_bo_pin(struct nouveau_bo *bo, uint32_t flags)
|
|||
return nouveau_bo_pin_nomm(bo, flags);
|
||||
|
||||
/* Ensure we have a kernel object... */
|
||||
if (!nvbo->handle) {
|
||||
if (!nvbo->flags) {
|
||||
if (!(flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART)))
|
||||
return -EINVAL;
|
||||
nvbo->flags = flags;
|
||||
}
|
||||
|
||||
if (!nvbo->handle) {
|
||||
ret = nouveau_bo_kalloc(nvbo, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue