diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-10-16 08:15:11 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:46 -0400 |
commit | 2eb6dcb4694c8b83e22c50d9fd4d3fdd85b93c46 (patch) | |
tree | 0a2d10c9873b81fd6a6821959874d4345cc6bfad /drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h | |
parent | ecc6f27fd13e7560d124faf67d114b93d47b73de (diff) |
gpu: nvgpu: Implement 64k large page support
Implement support for 64kB large page size. Add an API to create an
address space via IOCTL so that we can accept flags, and assign one
flag for enabling 64kB large page size.
Also adds APIs to set per-context large page size. This is possible
only on Maxwell, so return error if caller tries to set large page
size on Kepler.
Default large page size is still 128kB.
Change-Id: I20b51c8f6d4a984acae8411ace3de9000c78e82f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h index 817e4fc4..7655d2a3 100644 --- a/drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h | |||
@@ -66,6 +66,10 @@ static inline u32 fb_mmu_ctrl_vm_pg_size_128kb_f(void) | |||
66 | { | 66 | { |
67 | return 0x0; | 67 | return 0x0; |
68 | } | 68 | } |
69 | static inline u32 fb_mmu_ctrl_vm_pg_size_64kb_f(void) | ||
70 | { | ||
71 | return 0x1; | ||
72 | } | ||
69 | static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r) | 73 | static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r) |
70 | { | 74 | { |
71 | return (r >> 15) & 0x1; | 75 | return (r >> 15) & 0x1; |
@@ -78,6 +82,18 @@ static inline u32 fb_mmu_ctrl_pri_fifo_space_v(u32 r) | |||
78 | { | 82 | { |
79 | return (r >> 16) & 0xff; | 83 | return (r >> 16) & 0xff; |
80 | } | 84 | } |
85 | static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_v(u32 r) | ||
86 | { | ||
87 | return (r >> 11) & 0x1; | ||
88 | } | ||
89 | static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_true_f(void) | ||
90 | { | ||
91 | return 0x800; | ||
92 | } | ||
93 | static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_false_f(void) | ||
94 | { | ||
95 | return 0x0; | ||
96 | } | ||
81 | static inline u32 fb_priv_mmu_phy_secure_r(void) | 97 | static inline u32 fb_priv_mmu_phy_secure_r(void) |
82 | { | 98 | { |
83 | return 0x00100ce4; | 99 | return 0x00100ce4; |