diff options
author | neha <njoshi@nvidia.com> | 2016-04-11 08:12:39 -0400 |
---|---|---|
committer | Nirav Patel <nipatel@nvidia.com> | 2016-07-22 18:10:22 -0400 |
commit | f3d89a2997800a185c2b645593fffe342dc332df (patch) | |
tree | 7196e71579579b35a1341cf950de3afa2acebdda /drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h | |
parent | 51a32d8f2c97ae42fd714078c97af83c7136878f (diff) |
gpu: nvgpu: Full chip support for ctxsw
nvgpu changes needed to handle the newly added ctxsw lists
Fix regops support for ppc registers
Squashed from:
Change-Id: I08e6dec3bb2f7aa51de912c9d1c84a350ce07f72
Signed-off-by: neha <njoshi@nvidia.com>
Reviewed-on: http://git-master/r/1151010
(cherry picked from commit fd03ad9f09e66f78db88fb7ece448e26e0515821)
and:
Change-Id: I75a7f810ee0b613c22ac2cef2d936563d8067f97
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: http://git-master/r/1158888
(cherry picked from commit f00a7fcc57fb937b800e46760087ff6f7637520c)
Bug 200180000
Bug 1771830
Reviewed-on: http://git-master/r/1164397
(cherry picked from commit 7028f051e4f37edeff90a9923f022cec6c645a8f)
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Change-Id: I796ddf93ef37170843a4a6b44190cd6780d25852
Reviewed-on: http://git-master/r/1183588
Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h index a7656d38..88521555 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_pri_gk20a.h | |||
@@ -69,6 +69,35 @@ static inline u32 pri_get_gpc_num(struct gk20a *g, u32 addr) | |||
69 | } | 69 | } |
70 | return 0; | 70 | return 0; |
71 | } | 71 | } |
72 | |||
73 | /* | ||
74 | * PPC pri addressing | ||
75 | */ | ||
76 | static inline bool pri_is_ppc_addr_shared(struct gk20a *g, u32 addr) | ||
77 | { | ||
78 | u32 ppc_in_gpc_shared_base = nvgpu_get_litter_value(g, | ||
79 | GPU_LIT_PPC_IN_GPC_SHARED_BASE); | ||
80 | u32 ppc_in_gpc_stride = nvgpu_get_litter_value(g, | ||
81 | GPU_LIT_PPC_IN_GPC_STRIDE); | ||
82 | |||
83 | return ((addr >= ppc_in_gpc_shared_base) && | ||
84 | (addr < (ppc_in_gpc_shared_base + ppc_in_gpc_stride))); | ||
85 | } | ||
86 | |||
87 | static inline bool pri_is_ppc_addr(struct gk20a *g, u32 addr) | ||
88 | { | ||
89 | u32 ppc_in_gpc_base = nvgpu_get_litter_value(g, | ||
90 | GPU_LIT_PPC_IN_GPC_BASE); | ||
91 | u32 num_pes_per_gpc = nvgpu_get_litter_value(g, | ||
92 | GPU_LIT_NUM_PES_PER_GPC); | ||
93 | u32 ppc_in_gpc_stride = nvgpu_get_litter_value(g, | ||
94 | GPU_LIT_PPC_IN_GPC_STRIDE); | ||
95 | |||
96 | return ((addr >= ppc_in_gpc_base) && | ||
97 | (addr < ppc_in_gpc_base + num_pes_per_gpc * ppc_in_gpc_stride)) | ||
98 | || pri_is_ppc_addr_shared(g, addr); | ||
99 | } | ||
100 | |||
72 | /* | 101 | /* |
73 | * TPC pri addressing | 102 | * TPC pri addressing |
74 | */ | 103 | */ |