diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-06 16:10:46 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:52:12 -0500 |
commit | 342d45e060ba9c6a7815633c351ec8d95422dcbb (patch) | |
tree | 032902b9a45c379826a5206307007f59fce6aee3 /drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | |
parent | b268c9103760fd26706cb3a5b651b82fb82fb105 (diff) |
gpu: nvgpu: gp10b: Add litter values HAL
Move per-chip constants to be returned by a chip specific function.
Implement get_litter_value() for each chip.
Change-Id: I8bda9bf99b2cc6aba0fb88a69cc374e0a6abab6b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1121384
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/ltc_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c index e68e762d..92735f1a 100644 --- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include "gk20a/gk20a.h" | 20 | #include "gk20a/gk20a.h" |
21 | #include "gm20b/ltc_gm20b.h" | 21 | #include "gm20b/ltc_gm20b.h" |
22 | #include "hw_proj_gp10b.h" | ||
23 | #include "hw_mc_gp10b.h" | 22 | #include "hw_mc_gp10b.h" |
24 | #include "hw_ltc_gp10b.h" | 23 | #include "hw_ltc_gp10b.h" |
25 | 24 | ||
@@ -125,6 +124,8 @@ static void gp10b_ltc_isr(struct gk20a *g) | |||
125 | { | 124 | { |
126 | u32 mc_intr, ltc_intr; | 125 | u32 mc_intr, ltc_intr; |
127 | int ltc, slice; | 126 | int ltc, slice; |
127 | u32 ltc_stride = nvgpu_get_litter_value(g, GPU_LIT_LTC_STRIDE); | ||
128 | u32 lts_stride = nvgpu_get_litter_value(g, GPU_LIT_LTS_STRIDE); | ||
128 | 129 | ||
129 | mc_intr = gk20a_readl(g, mc_intr_ltc_r()); | 130 | mc_intr = gk20a_readl(g, mc_intr_ltc_r()); |
130 | gk20a_err(dev_from_gk20a(g), "mc_ltc_intr: %08x", | 131 | gk20a_err(dev_from_gk20a(g), "mc_ltc_intr: %08x", |
@@ -133,8 +134,7 @@ static void gp10b_ltc_isr(struct gk20a *g) | |||
133 | if ((mc_intr & 1 << ltc) == 0) | 134 | if ((mc_intr & 1 << ltc) == 0) |
134 | continue; | 135 | continue; |
135 | for (slice = 0; slice < g->gr.slices_per_ltc; slice++) { | 136 | for (slice = 0; slice < g->gr.slices_per_ltc; slice++) { |
136 | u32 offset = proj_ltc_stride_v() * ltc + | 137 | u32 offset = ltc_stride * ltc + lts_stride * slice; |
137 | proj_lts_stride_v() * slice; | ||
138 | ltc_intr = gk20a_readl(g, ltc_ltc0_lts0_intr_r() + offset); | 138 | ltc_intr = gk20a_readl(g, ltc_ltc0_lts0_intr_r() + offset); |
139 | 139 | ||
140 | /* Detect and handle ECC errors */ | 140 | /* Detect and handle ECC errors */ |
@@ -180,8 +180,7 @@ static void gp10b_ltc_isr(struct gk20a *g) | |||
180 | gk20a_err(dev_from_gk20a(g), "ltc%d, slice %d: %08x", | 180 | gk20a_err(dev_from_gk20a(g), "ltc%d, slice %d: %08x", |
181 | ltc, slice, ltc_intr); | 181 | ltc, slice, ltc_intr); |
182 | gk20a_writel(g, ltc_ltc0_lts0_intr_r() + | 182 | gk20a_writel(g, ltc_ltc0_lts0_intr_r() + |
183 | proj_ltc_stride_v() * ltc + | 183 | ltc_stride * ltc + lts_stride * slice, |
184 | proj_lts_stride_v() * slice, | ||
185 | ltc_intr); | 184 | ltc_intr); |
186 | } | 185 | } |
187 | } | 186 | } |