@@ -102,6 +102,7 @@ nvkm_umem_map(struct nvkm_object *object, void *argv, u32 argc,
*handle = (unsigned long)(void *)umem->map;
*length = nvkm_memory_size(umem->memory);
*type = NVKM_OBJECT_MAP_VA;
+ umem->io = false;
return 0;
} else
if ((umem->type & NVKM_MEM_VRAM) ||
@@ -112,12 +113,11 @@ nvkm_umem_map(struct nvkm_object *object, void *argv, u32 argc,
return ret;
*type = NVKM_OBJECT_MAP_IO;
- } else {
- return -EINVAL;
+ umem->io = true;
+ return 0;
}
- umem->io = (*type == NVKM_OBJECT_MAP_IO);
- return 0;
+ return -EINVAL;
}
static void *