aboutsummaryrefslogtreecommitdiffstatshomepage
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
parentMerge tag 'drm-intel-gt-next-2020-11-12-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next (diff)
parentdrm/nouveau/ttm: avoid using nouveau_drm.ttm.type_vram prior to nv50 (diff)
downloadwireguard-linux-31b05212360cbf3af3c2e1b7f42e176e0eebedb5.tar.xz
wireguard-linux-31b05212360cbf3af3c2e1b7f42e176e0eebedb5.zip
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
-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;