diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/ltc_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c index 43c90970..91046d93 100644 --- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | |||
@@ -237,6 +237,19 @@ static void gm20b_ltc_g_elpg_flush_locked(struct gk20a *g) | |||
237 | "g_elpg_flush too many retries"); | 237 | "g_elpg_flush too many retries"); |
238 | } | 238 | } |
239 | 239 | ||
240 | u32 gm20b_ltc_cbc_fix_config(struct gk20a *g, int base) | ||
241 | { | ||
242 | u32 val = gk20a_readl(g, ltc_ltcs_ltss_cbc_num_active_ltcs_r()); | ||
243 | if (val == 2) { | ||
244 | return base * 2; | ||
245 | } else if (val != 1) { | ||
246 | gk20a_err(dev_from_gk20a(g), | ||
247 | "Invalid number of active ltcs: %08x\n", val); | ||
248 | } | ||
249 | |||
250 | return base; | ||
251 | } | ||
252 | |||
240 | void gm20b_init_ltc(struct gpu_ops *gops) | 253 | void gm20b_init_ltc(struct gpu_ops *gops) |
241 | { | 254 | { |
242 | /* Gk20a reused ops. */ | 255 | /* Gk20a reused ops. */ |
@@ -255,4 +268,5 @@ void gm20b_init_ltc(struct gpu_ops *gops) | |||
255 | gops->ltc.cbc_ctrl = gm20b_ltc_cbc_ctrl; | 268 | gops->ltc.cbc_ctrl = gm20b_ltc_cbc_ctrl; |
256 | gops->ltc.elpg_flush = gm20b_ltc_g_elpg_flush_locked; | 269 | gops->ltc.elpg_flush = gm20b_ltc_g_elpg_flush_locked; |
257 | gops->ltc.isr = gm20b_ltc_isr; | 270 | gops->ltc.isr = gm20b_ltc_isr; |
271 | gops->ltc.cbc_fix_config = gm20b_ltc_cbc_fix_config; | ||
258 | } | 272 | } |