gpu: nvgpu: Setup GFX-capable TPCs

This patch dispatches to the appropriate HAL to
select the GFX-capable TPCs.

Bug 3944931

Change-Id: Ifb7338bea2cd59581133b7a2ba723f5d8bfa507c
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2891725
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Martin Radev
2023-04-20 22:52:32 +03:00
committed by mobile promotions
parent c728f09c18
commit 84bb919909
2 changed files with 10 additions and 0 deletions

View File

@@ -680,6 +680,13 @@ static int gr_reset_hw_and_load_prod(struct gk20a *g)
return err; 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)); 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*/ /* Disable elcg until it gets enabled later in the init*/

View File

@@ -941,6 +941,9 @@ struct gops_gr_init {
void (*auto_go_idle)(struct gk20a *g, bool enable); void (*auto_go_idle)(struct gk20a *g, bool enable);
void (*eng_config)(struct gk20a *g); void (*eng_config)(struct gk20a *g);
int (*reset_gpcs)(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, int (*sm_id_config_early)(struct gk20a *g,
struct nvgpu_gr_config *config); struct nvgpu_gr_config *config);
int (*load_sm_id_config)(struct gk20a *g, int (*load_sm_id_config)(struct gk20a *g,