mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
Expose below two new APIs from common.grmgr unit nvgpu_grmgr_get_gr_num_gpcs() - get per instance number of GPCs nvgpu_grmgr_get_gr_gpc_phys_id() - get physical GPC id for MIG engine local id in corresponding instance Execute gr_init_config() for each GR instance. Add gr_config_init_mig_gpcs() to initialize GPC data in case MIG is enabled. Separate out gr_config_init_gpcs() for legacy GPC data initialization. These functions will inititialize below data in struct nvgpu_gr_config: max_gpc_count gpc_count gpc_mask gpc_tpc_mask[gpc_count] max_tpc_per_gpc_count Rest of the values in struct nvgpu_gr_config are either based on above values, or read from HW after setting GPC PRI window. In gr_config_alloc_struct_mem(), rename total_gpc_cnt to total_tpc_cnt since it represents total TPC count and not GPC. Remove use of temp3 variable since it does not give any idea on usage. Jira NVGPU-5648 Change-Id: I646cac2ddc312e72b241b1b2a0e51a5cce141535 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2406390 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Lakshmanan M <lm@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>