aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 2c9981512d27..41be584147b9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -227,11 +227,12 @@ nouveau_gem_info(struct drm_file *file_priv, struct drm_gem_object *gem,
227 struct nouveau_bo *nvbo = nouveau_gem_object(gem); 227 struct nouveau_bo *nvbo = nouveau_gem_object(gem);
228 struct nvkm_vma *vma; 228 struct nvkm_vma *vma;
229 229
230 if (nvbo->bo.mem.mem_type == TTM_PL_TT) 230 if (is_power_of_2(nvbo->valid_domains))
231 rep->domain = nvbo->valid_domains;
232 else if (nvbo->bo.mem.mem_type == TTM_PL_TT)
231 rep->domain = NOUVEAU_GEM_DOMAIN_GART; 233 rep->domain = NOUVEAU_GEM_DOMAIN_GART;
232 else 234 else
233 rep->domain = NOUVEAU_GEM_DOMAIN_VRAM; 235 rep->domain = NOUVEAU_GEM_DOMAIN_VRAM;
234
235 rep->offset = nvbo->bo.offset; 236 rep->offset = nvbo->bo.offset;
236 if (cli->vm) { 237 if (cli->vm) {
237 vma = nouveau_bo_vma_find(nvbo, cli->vm); 238 vma = nouveau_bo_vma_find(nvbo, cli->vm);