diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-07-09 11:41:47 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-07-09 11:41:47 +1000 |
commit | f257201c11fd1aff9319aaf47556b184141ac7cb (patch) | |
tree | caa6c8e21483dbe5063524e28f977640b9380690 /libdrm | |
parent | 4179c5f0a69b452cf94a507c13021e4918a3e02d (diff) |
nouveau: fix pin for buffers created with bo_wrap
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/nouveau/nouveau_bo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libdrm/nouveau/nouveau_bo.c b/libdrm/nouveau/nouveau_bo.c index e68533b7..fea3a7de 100644 --- a/libdrm/nouveau/nouveau_bo.c +++ b/libdrm/nouveau/nouveau_bo.c @@ -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; |