diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index 9f3829b07..222f939bc 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -291,6 +291,10 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_TEGRA_GR_VIRTUALIZATION_SERVER CONFIG_NVGPU_SM_DIVERSITY := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_SM_DIVERSITY +# Enable Multi Instance GPU support for normal build +CONFIG_NVGPU_MIG := 1 +NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_MIG + endif endif diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 48849d84f..30bae37f5 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -173,6 +173,10 @@ enum nvgpu_profiler_pm_reservation_scope; #include "hal/clk/clk_gk20a.h" +#if defined(CONFIG_NVGPU_NEXT) && defined(CONFIG_NVGPU_MIG) +#include "include/nvgpu/nvgpu_next_gops_grmgr.h" +#endif + #ifdef CONFIG_DEBUG_FS struct railgate_stats { unsigned long last_rail_gate_start; @@ -636,6 +640,11 @@ struct gpu_ops { } tpc; #endif void (*semaphore_wakeup)(struct gk20a *g, bool post_events); + +#if defined(CONFIG_NVGPU_NEXT) && defined(CONFIG_NVGPU_MIG) + struct gops_grmgr grmgr; +#endif + }; /** diff --git a/drivers/gpu/nvgpu/include/nvgpu/gops_priv_ring.h b/drivers/gpu/nvgpu/include/nvgpu/gops_priv_ring.h index d60285300..a8cbb88ef 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gops_priv_ring.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gops_priv_ring.h @@ -143,6 +143,10 @@ struct gops_priv_ring { void (*decode_error_code)(struct gk20a *g, u32 error_code); /** @endcond DOXYGEN_SHOULD_SKIP_THIS */ +#if defined(CONFIG_NVGPU_NEXT) +#include "include/nvgpu/nvgpu_next_gops_priv_ring.h" +#endif + }; #endif /* NVGPU_GOPS_PRIV_RING_H */