gpu: nvgpu: split ecc support per GPU HW unit

To enable ecc interrupts early during nvgpu_finalize_poweron, ecc
support has to be enabled early. ecc support was being initialized
together for GR, LTC, PMU, FB units late in the poweron sequence.

Move the ecc init for each unit to respective unit's init functions.
And separate out the hal ecc functions from GR ecc unit to
respective hal units.

JIRA NVGPU-4336

Change-Id: I2c42fb6ba3192dece00be61411c64a56ce16740a
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2239153
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sagar Kamble
2019-11-12 21:53:05 +05:30
committed by Alex Waterman
parent 89518f3740
commit daf5475f50
44 changed files with 1033 additions and 706 deletions

View File

@@ -242,6 +242,11 @@ static int init_test_env(struct unit_module *m, struct gk20a *g)
* preparation
*/
err = g->ops.ecc.ecc_init_support(g);
if (err != 0) {
unit_return_fail(m, "ecc init failed\n");
}
err = g->ops.mm.init_mm_support(g);
if (err != 0) {
unit_return_fail(m, "failed to init gk20a mm");
@@ -384,6 +389,11 @@ int test_acr_construct_execute(struct unit_module *m,
unit_return_fail(m, "Bootstrap HS ACR failed");
}
err = g->ops.ecc.ecc_init_support(g);
if (err != 0) {
unit_return_fail(m, "ecc init failed\n");
}
/*
* case 2: pass g->acr as NULL to create fail scenario
*/
@@ -470,7 +480,6 @@ int test_acr_prepare_ucode_blob(struct unit_module *m,
unit_return_fail(m, "Test env init failed\n");
}
nvgpu_mutex_acquire(&g->tpc_pg_lock);
/*