]> Git Repo - linux.git/commitdiff
drm/nouveau: avoid GPU page sizes > PAGE_SIZE for buffer objects in host memory
authorBen Skeggs <[email protected]>
Thu, 7 Dec 2017 05:25:14 +0000 (15:25 +1000)
committerBen Skeggs <[email protected]>
Tue, 19 Dec 2017 00:16:37 +0000 (10:16 +1000)
While the Tegra (GK20A, GM20B, GP10B) MMUs support large pages in host
memory, we're currently lacking IOMMU support for merging system pages
into large enough chunks to be mapped as such by the GPU.

The core VMM code actually supports automatically determining the best
page size to map with, which is intended for these situations, but for
various complicated reasons the DRM is currently forcing the page size
selection on a per-BO basis.

This should fix breakage reported on Tegra GPUs in the meantime, until
one or both of the above issues are resolved properly.

Reported-by: Mikko Perttunen <[email protected]>
Fixes: 7dc6a446da7c ("drm/nouveau: improve selection of GPU page size")
Signed-off-by: Ben Skeggs <[email protected]>
Tested-by: Thierry Reding <[email protected]>
drivers/gpu/drm/nouveau/nouveau_bo.c

index 2615912430cc97098f0fe806e95e5e40c1ee96f7..42c1827bbb8e3f6ba383809e5ac41d3265d4830b 100644 (file)
@@ -262,7 +262,8 @@ nouveau_bo_new(struct nouveau_cli *cli, u64 size, int align,
                if (cli->device.info.family > NV_DEVICE_INFO_V0_CURIE &&
                    (flags & TTM_PL_FLAG_VRAM) && !vmm->page[i].vram)
                        continue;
-               if ((flags & TTM_PL_FLAG_TT  ) && !vmm->page[i].host)
+               if ((flags & TTM_PL_FLAG_TT) &&
+                   (!vmm->page[i].host || vmm->page[i].shift > PAGE_SHIFT))
                        continue;
 
                /* Select this page size if it's the first that supports
This page took 0.062253 seconds and 4 git commands to generate.