diff options
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; | 
