[Nouveau] [PATCH 0/6] map big page by platform IOMMU

Alexandre Courbot gnurou at gmail.com
Thu Apr 16 23:25:52 PDT 2015


On Thu, Apr 16, 2015 at 8:06 PM, Vince Hsu <vinceh at nvidia.com> wrote:
> Hi,
>
> Generally the the imported buffers which has memory type TTM_PL_TT are
> mapped as small pages probably due to lack of big page allocation. But the
> platform device which also use memory type TTM_PL_TT, like GK20A, can

Nit: GK20A can *only* allocate GPU memory from TTM_PL_TT. Trying to
allocate from VRAM will result in an error.

> *allocate* big page though the IOMMU hardware inside the SoC. This is a try
> to map the imported buffers as big pages in GMMU by the platform IOMMU. With
> some preparation work to map decreate small pages into big page(s) by IOMMU

decreate?

> the GMMU eventually sees the imported buffer as chunks of big pages and does
> the mapping. And then we can probably do the compression on teh imported
> buffer which is composed of non-contiguous small pages. The compbits related
> patches shall come later.
>
> I guess most of you won't like the change for the MMU code in this series.
> So please comment and guide me how to do this better. :)
>
> Thanks,
> Vince
>
> Vince Hsu (6):
>   platform: specify the IOMMU physical translation bit
>   instmem/gk20a: refer to IOMMU physical translation bit
>   mmu: map small pages into big pages(s) by IOMMU if possible
>   drm: enable big page mapping for small pages when IOMMU is available
>   mmu: gf100: share most of functions with GK20A
>   mmu: gk20a: implement IOMMU mapping for big pages
>
>  drm/nouveau/include/nvkm/subdev/mmu.h   |  16 ++
>  drm/nouveau/nouveau_bo.c                |   9 ++
>  drm/nouveau/nouveau_platform.c          |  19 +++
>  drm/nouveau/nouveau_platform.h          |   1 +
>  drm/nouveau/nvkm/engine/device/gk104.c  |   2 +-
>  drm/nouveau/nvkm/subdev/instmem/gk20a.c |  13 +-
>  drm/nouveau/nvkm/subdev/mmu/Kbuild      |   1 +
>  drm/nouveau/nvkm/subdev/mmu/base.c      | 158 +++++++++++++++++++-
>  drm/nouveau/nvkm/subdev/mmu/gf100.c     |  28 +---
>  drm/nouveau/nvkm/subdev/mmu/gf100.h     |  46 ++++++
>  drm/nouveau/nvkm/subdev/mmu/gk20a.c     | 253 ++++++++++++++++++++++++++++++++
>  lib/include/nvif/os.h                   |  12 ++
>  12 files changed, 526 insertions(+), 32 deletions(-)
>  create mode 100644 drm/nouveau/nvkm/subdev/mmu/gf100.h
>  create mode 100644 drm/nouveau/nvkm/subdev/mmu/gk20a.c
>
> --
> 2.1.4
>


More information about the Nouveau mailing list