diff --git a/drivers/gpu/nvgpu/Makefile.linux.configs b/drivers/gpu/nvgpu/Makefile.linux.configs index 1e0e2e8c9..87875dd3e 100644 --- a/drivers/gpu/nvgpu/Makefile.linux.configs +++ b/drivers/gpu/nvgpu/Makefile.linux.configs @@ -208,6 +208,8 @@ endif CONFIG_NVGPU_TSG_SHARING := y +CONFIG_NVGPU_EPL_INIT := n + ifeq ($(CONFIG_GK20A_PMU),y) ccflags-y += -DCONFIG_GK20A_PMU endif diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index ed02feb3e..b402af66b 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -202,6 +202,15 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FALCON_DEBUG # ifneq ($(profile),safety_debug) +ifneq ($(NVGPU_HVRTOS),1) +ifeq ($(CONFIG_NVGPU_ENABLE_MISC_EC),1) +ifneq ($(CONFIG_NVGPU_MON_PRESENT),1) +CONFIG_NVGPU_EPL_INIT := 1 +NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_EPL_INIT +endif +endif +endif + ifneq ($(NVGPU_HVRTOS),1) CONFIG_NVGPU_SYSFS := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SYSFS diff --git a/drivers/gpu/nvgpu/common/cic/mon/mon_init.c b/drivers/gpu/nvgpu/common/cic/mon/mon_init.c index af5ac3ae9..9132efcde 100644 --- a/drivers/gpu/nvgpu/common/cic/mon/mon_init.c +++ b/drivers/gpu/nvgpu/common/cic/mon/mon_init.c @@ -60,6 +60,14 @@ int nvgpu_cic_mon_init(struct gk20a *g) return -EINVAL; } +#ifdef CONFIG_NVGPU_EPL_INIT + err = nvgpu_cic_mon_init_epl(g); + if (err != 0) { + nvgpu_err(g, "NvEpl init failed: %d", err); + return -EINVAL; + } +#endif + #ifdef CONFIG_NVGPU_FSI_ERR_INJECTION if (g->ops.cic_mon.reg_errinj_cb != NULL) { err = g->ops.cic_mon.reg_errinj_cb(g); diff --git a/drivers/gpu/nvgpu/include/nvgpu/cic_mon.h b/drivers/gpu/nvgpu/include/nvgpu/cic_mon.h index cea989145..1bc6ec417 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/cic_mon.h +++ b/drivers/gpu/nvgpu/include/nvgpu/cic_mon.h @@ -663,4 +663,9 @@ void nvgpu_cic_mon_intr_enable(struct gk20a *g); int nvgpu_cic_mon_reg_errinj_cb(struct gk20a *g); int nvgpu_cic_mon_dereg_errinj_cb(void); #endif + +#ifdef CONFIG_NVGPU_EPL_INIT +int nvgpu_cic_mon_init_epl(struct gk20a *g); +#endif + #endif /* NVGPU_CIC_MON_H */