]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
gpu: nvgpu: make larger address space work
authorAlex Waterman <alexw@nvidia.com>
Thu, 11 Dec 2014 19:33:52 +0000 (11:33 -0800)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Fri, 16 Jan 2015 18:45:48 +0000 (10:45 -0800)
commit3440ef7331b355bab9f26196864dc10015bd3a4d
tree79547192be386fbbf063595ec18956c324f4cc81
parentf43a69ca3617b8e7893a38dde08690c83553db94
gpu: nvgpu: make larger address space work

Implement several fixes for allowing the GVA address space to grow
to larger than 32GB and increase the address space to 128GB.

 o  Implement dynamic allocation of PDE backing pages. The memory
    to store the PDE entries was hard coded to 1 page. Now the
    number of pages necessary is computed dynamically based on the
    size of the address space and the size of large pages.

 o  Fix an arithmetic problem in the gm20b sparse texture code
    that caused large address spaces to be truncated when sparse
    PDEs/PTEs were being filled in. This caused a kernel panic
    when freeing the address space since a lot of the backing
    PTE memory was not allocated.

 o  Change the address space split for large and small pages. Small
    pages now occupy the bottom 16GB of the address space. Large
    pages are used for the rest of the address space. Now, with a
    128GB address space, there are 112GB of large page GVA available.

This patch exists to allow large (16GB) sparse textures to be allocated
without running into lack of memory issues and kernel panics.

Bug 1574267

Change-Id: I7c59ee54bd573dfc53b58c346156df37a85dfc22
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/671204
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/gpu/nvgpu/gk20a/mm_gk20a.c
drivers/gpu/nvgpu/gk20a/mm_gk20a.h
drivers/gpu/nvgpu/gm20b/mm_gm20b.c