diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-11-01 03:56:20 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 13:32:32 +1000 |
commit | b34720200bb1334c78aaecb999cc2b18a71b9277 (patch) | |
tree | e0d5eab47b48924a72912e585e0b5737c4e014a6 /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | 658c71f4e7cabce658692a81732563e74de0c952 (diff) | |
download | linux-stable-b34720200bb1334c78aaecb999cc2b18a71b9277.tar.gz linux-stable-b34720200bb1334c78aaecb999cc2b18a71b9277.tar.bz2 linux-stable-b34720200bb1334c78aaecb999cc2b18a71b9277.zip |
drm/nouveau: use nvif_mmu_type to determine BAR1 caching
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 8aa2bc6f78fb..6e7e283e18b5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -589,6 +589,7 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, struct ttm_mem_type_manager *man) { struct nouveau_drm *drm = nouveau_bdev(bdev); + struct nvif_mmu *mmu = &drm->client.mmu; switch (type) { case TTM_PL_SYSTEM: @@ -605,7 +606,8 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) { /* Some BARs do not support being ioremapped WC */ - if (nvxx_bar(&drm->client.device)->iomap_uncached) { + const u8 type = mmu->type[drm->ttm.type_vram].type; + if (type & NVIF_MEM_UNCACHED) { man->available_caching = TTM_PL_FLAG_UNCACHED; man->default_caching = TTM_PL_FLAG_UNCACHED; } |