summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-11-16 07:25:46 +1000
committerDave Airlie <airlied@redhat.com>2020-11-16 07:25:46 +1000
commit31b05212360cbf3af3c2e1b7f42e176e0eebedb5 (patch)
tree41ed76265563e5183371a430d69caeaded820db8 /drivers/gpu/drm/nouveau
parent334a1683935fceba346768b62cb3bb2d3e045578 (diff)
parentbe323a4cef022aa9685b08d5a94ddc841ccf617a (diff)
downloadlinux-31b05212360cbf3af3c2e1b7f42e176e0eebedb5.tar.bz2
Merge branch 'linux-5.11' of git://github.com/skeggsb/linux into drm-next
-next fix for type stuff. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Ben Skeggs <skeggsb@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5vuM54oU1Yp8sX5ZVmJAv+-oQRQj-AeaKFb3qs1EtP-g@mail.gmail.com
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 7aa4286784ae..62a4fdffd0ae 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1057,12 +1057,8 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_resource *reg)
struct nvkm_device *device = nvxx_device(&drm->client.device);
struct nouveau_mem *mem = nouveau_mem(reg);
struct nvif_mmu *mmu = &drm->client.mmu;
- u8 type = 0;
int ret;
- if (drm->ttm.type_vram >= 0)
- type = mmu->type[drm->ttm.type_vram].type;
-
mutex_lock(&drm->ttm.io_reserve_mutex);
retry:
switch (reg->mem_type) {
@@ -1093,7 +1089,7 @@ retry:
/* Some BARs do not support being ioremapped WC */
if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA &&
- type & NVIF_MEM_UNCACHED)
+ mmu->type[drm->ttm.type_vram].type & NVIF_MEM_UNCACHED)
reg->bus.caching = ttm_uncached;
else
reg->bus.caching = ttm_write_combined;