diff options
author | Dave Airlie <airlied@redhat.com> | 2015-10-21 19:15:10 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-10-21 19:15:10 -0400 |
commit | 37363bc03e0b53c45e98f34e35c75b55611417e0 (patch) | |
tree | 24f0e6fab47416c31a6ba5e670e6e48d822beb9f | |
parent | 30730c7f5943b3beace1e29f7f1476e05de3da14 (diff) | |
parent | 2a6c521bb41ce862e43db46f52e7681d33e8d771 (diff) |
Merge branch 'linux-4.3' of git://anongit.freedesktop.org/nouveau/linux-2.6 into drm-fixes
Just one fix from Ilia to resolve various issues that have resulted from
buffer eviction.
* 'linux-4.3' of git://anongit.freedesktop.org/nouveau/linux-2.6:
drm/nouveau/gem: return only valid domain when there's only one
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_gem.c | 5 |
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); |