nouveau: fix pin for buffers created with bo_wrap

This commit is contained in:
Ben Skeggs 2009-07-09 11:41:47 +10:00
parent 4179c5f0a6
commit f257201c11

View file

@ -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;