mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: remove cyclic dependency between gr and ecc
Removed gr dependency on ecc by moving ecc init/remove support calls to nvgpu_init. With this, only dependency from ecc to gr present. Added following parameter in struct nvgpu_ecc to check/update ecc initialization status: bool initialized; JIRA NVGPU-3212 Change-Id: I04611175cbd959cb8082e63c30214266f5d5b731 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2107955 GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
258a6141fd
commit
fde780300d
@@ -35,6 +35,7 @@
|
||||
#include <nvgpu/gmmu.h>
|
||||
#include <nvgpu/ltc.h>
|
||||
#include <nvgpu/cbc.h>
|
||||
#include <nvgpu/ecc.h>
|
||||
#include <nvgpu/vidmem.h>
|
||||
#include <nvgpu/mm.h>
|
||||
#include <nvgpu/soc.h>
|
||||
@@ -377,6 +378,13 @@ int gk20a_finalize_poweron(struct gk20a *g)
|
||||
goto done;
|
||||
}
|
||||
|
||||
err = nvgpu_ecc_init_support(g);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "failed to init ecc");
|
||||
nvgpu_mutex_release(&g->tpc_pg_lock);
|
||||
goto done;
|
||||
}
|
||||
|
||||
nvgpu_mutex_release(&g->tpc_pg_lock);
|
||||
|
||||
if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) {
|
||||
@@ -582,6 +590,8 @@ static void gk20a_free_cb(struct nvgpu_ref *refcount)
|
||||
|
||||
nvgpu_cbc_remove_support(g);
|
||||
|
||||
nvgpu_ecc_remove_support(g);
|
||||
|
||||
if (g->remove_support != NULL) {
|
||||
g->remove_support(g);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user