From a15aaba53ce70d91537cafac342f5069b31dcf9e Mon Sep 17 00:00:00 2001 From: vinodg Date: Mon, 16 Sep 2019 16:53:39 -0700 Subject: [PATCH] gpu: nvgpu: units: gr: Add gr ecc_init support Enable gr ecc_init_support as part of the gr_init_support. Jira NVGPU-3970 Change-Id: I4d1026b3025e5d54988f7612e1ed07a6ad8b34f5 Signed-off-by: vinodg Reviewed-on: https://git-master.nvidia.com/r/2199131 Reviewed-by: svc-mobile-coverity Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/units/gr/nvgpu-gr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/userspace/units/gr/nvgpu-gr.c b/userspace/units/gr/nvgpu-gr.c index 25d7c8966..434796830 100644 --- a/userspace/units/gr/nvgpu-gr.c +++ b/userspace/units/gr/nvgpu-gr.c @@ -105,11 +105,22 @@ int test_gr_init_support(struct unit_module *m, struct gk20a *g, void *args) /* over-ride the falcon load_ctxsw_ucode */ g->ops.gr.falcon.load_ctxsw_ucode = test_gr_falcon_load_ctxsw_ucode; + /* init gpu characteristics */ + g->ops.chip_init_gpu_characteristics(g); + err = nvgpu_gr_init_support(g); if (err != 0) { unit_return_fail(m, "nvgpu_gr_init_support returned fail\n"); } + /* gr ecc init */ + if (g->ops.gr.ecc.ecc_init_support != NULL) { + err = g->ops.gr.ecc.ecc_init_support(g); + if (err != 0) { + unit_return_fail(m, "gr_ecc_init failed\n"); + } + } + return UNIT_SUCCESS; }