Commit 31b05212 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'linux-5.11' of git://github.com/skeggsb/linux into drm-next

parents 334a1683 be323a4c
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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;