diff --git a/drivers/gpu/nvgpu/common/gr/gr.c b/drivers/gpu/nvgpu/common/gr/gr.c index 5d7cf3bf2..2b04a0868 100644 --- a/drivers/gpu/nvgpu/common/gr/gr.c +++ b/drivers/gpu/nvgpu/common/gr/gr.c @@ -680,6 +680,13 @@ static int gr_reset_hw_and_load_prod(struct gk20a *g) return err; } +#ifdef CONFIG_NVGPU_GRAPHICS + if (g->ops.gr.init.setup_gfx_tpcs != NULL) { + nvgpu_gr_exec_for_all_instances(g, + g->ops.gr.init.setup_gfx_tpcs(g)); + } +#endif + nvgpu_gr_exec_for_all_instances(g, nvgpu_cg_init_gr_load_gating_prod(g)); /* Disable elcg until it gets enabled later in the init*/ diff --git a/drivers/gpu/nvgpu/include/nvgpu/gops/gr.h b/drivers/gpu/nvgpu/include/nvgpu/gops/gr.h index 0e8f6c178..56bd2a885 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gops/gr.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gops/gr.h @@ -941,6 +941,9 @@ struct gops_gr_init { void (*auto_go_idle)(struct gk20a *g, bool enable); void (*eng_config)(struct gk20a *g); int (*reset_gpcs)(struct gk20a *g); +#ifdef CONFIG_NVGPU_GRAPHICS + void (*setup_gfx_tpcs)(struct gk20a *g); +#endif int (*sm_id_config_early)(struct gk20a *g, struct nvgpu_gr_config *config); int (*load_sm_id_config)(struct gk20a *g,