mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: add gpc_mask to gr/config unit
We get gpc_mask by calling GR HAL g->ops.gr.get_gpc_mask() But gpc_mask should be logically owned by gr/config unit Hence add new gpc_mask field to nvgpu_gr_config Initialize it in nvgpu_gr_config_init() by calling a new HAL g->ops.gr.config.get_gpc_mask() if available If HAL is not defined we just initialize it based on gpc_count Expose new API nvgpu_gr_config_get_gpc_mask() to get gpc_mask and use this API now Remove gr_gm20b_get_gpc_mask() and HAL g->ops.gr.get_gpc_mask() Update GV100 and TU104 chip HALs to remove old and add new HAL Add gpc_mask to struct tegra_vgpu_constants_params to support this on vGPU. Also get gpc_mask from vGPU private data in vgpu_gr_init_gr_config() Jira NVGPU-1879 Change-Id: Ibdc89ea51df944dc7085920509e3536a5721efc0 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2016084 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6fb2abb153
commit
00aeab6cca
@@ -284,6 +284,7 @@ gk20a_ctrl_ioctl_gpu_characteristics(
|
||||
|
||||
gpu.num_gpc = nvgpu_gr_config_get_gpc_count(g->gr.config);
|
||||
gpu.max_gpc_count = nvgpu_gr_config_get_max_gpc_count(g->gr.config);
|
||||
gpu.gpc_mask = nvgpu_gr_config_get_gpc_mask(g->gr.config);
|
||||
|
||||
gpu.num_tpc_per_gpc = nvgpu_gr_config_get_max_tpc_per_gpc_count(g->gr.config);
|
||||
|
||||
@@ -291,12 +292,6 @@ gk20a_ctrl_ioctl_gpu_characteristics(
|
||||
|
||||
gpu.compression_page_size = g->ops.fb.compression_page_size(g);
|
||||
|
||||
if (g->ops.gr.get_gpc_mask) {
|
||||
gpu.gpc_mask = g->ops.gr.get_gpc_mask(g);
|
||||
} else {
|
||||
gpu.gpc_mask = BIT32(gpu.num_gpc) - 1;
|
||||
}
|
||||
|
||||
gpu.flags = nvgpu_ctrl_ioctl_gpu_characteristics_flags(g);
|
||||
|
||||
gpu.arch = g->params.gpu_arch;
|
||||
|
||||
Reference in New Issue
Block a user