diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-05-28 20:21:12 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-30 14:56:42 -0400 |
commit | 4607098c3a889b815dc85035649856f225fffb0b (patch) | |
tree | b557958bdbb5f2ebf889c7ebe72576dd227e6616 /drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c | |
parent | 5716d89482c30bb1cb731138cac0b8747e2995c6 (diff) |
gpu: nvgpu: support CAU ctxsw list
CAU (Counter Aggregation Unit) registers might be split out from SMPC registers
and moved into their own list on some platforms
In gr_gk20a_init_ctx_vars_fw() add support to check if pm_cau list is available
If list is available, count will be set to non-zero here
In add_ctxsw_buffer_map_entries_gpcs(), parse the pm_cau list if count is
non-zero
Bug 2139870
Change-Id: Ia630e7d03481a6f927c6739d28ebfe49f221326f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1733208
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Braun (SW-GPU) <matthewb@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c index f829cb3a..3f22a1b7 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c | |||
@@ -343,6 +343,14 @@ static int gr_gk20a_init_ctx_vars_fw(struct gk20a *g, struct gr_gk20a *gr) | |||
343 | if (err) | 343 | if (err) |
344 | goto clean_up; | 344 | goto clean_up; |
345 | break; | 345 | break; |
346 | case NETLIST_REGIONID_NVPERF_PMCAU: | ||
347 | nvgpu_log_info(g, "NETLIST_REGIONID_NVPERF_PMCAU"); | ||
348 | err = gr_gk20a_alloc_load_netlist_aiv(g, | ||
349 | src, size, | ||
350 | &g->gr.ctx_vars.ctxsw_regs.pm_cau); | ||
351 | if (err) | ||
352 | goto clean_up; | ||
353 | break; | ||
346 | 354 | ||
347 | default: | 355 | default: |
348 | nvgpu_log_info(g, "unrecognized region %d skipped", i); | 356 | nvgpu_log_info(g, "unrecognized region %d skipped", i); |
@@ -395,6 +403,7 @@ clean_up: | |||
395 | nvgpu_kfree(g, g->gr.ctx_vars.ctxsw_regs.pm_rop.l); | 403 | nvgpu_kfree(g, g->gr.ctx_vars.ctxsw_regs.pm_rop.l); |
396 | nvgpu_kfree(g, g->gr.ctx_vars.ctxsw_regs.pm_ucgpc.l); | 404 | nvgpu_kfree(g, g->gr.ctx_vars.ctxsw_regs.pm_ucgpc.l); |
397 | nvgpu_kfree(g, g->gr.ctx_vars.ctxsw_regs.etpc.l); | 405 | nvgpu_kfree(g, g->gr.ctx_vars.ctxsw_regs.etpc.l); |
406 | nvgpu_kfree(g, g->gr.ctx_vars.ctxsw_regs.pm_cau.l); | ||
398 | nvgpu_release_firmware(g, netlist_fw); | 407 | nvgpu_release_firmware(g, netlist_fw); |
399 | err = -ENOENT; | 408 | err = -ENOENT; |
400 | } | 409 | } |