gpu: nvgpu: update SSMD array size

-Update SSMD array size to hold all supported super-surface
members
-Handle the error and report if invalid SSMD ID is found.

issue: At present SSMD array size set to 32 but overall
33 super-surface members are supported, when 33rd member
accessed system crash happened due to overflow access,
so fixing it by setting the SSMD array size to actual
number of super-surface members supported

Bug 200721968
Bug 200721966

Change-Id: I5ba1084a661d7497056f13a053d2fc79d50f595c
Signed-off-by: mkumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2528569
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
mkumbar
2021-05-12 20:50:29 +05:30
committed by mobile promotions
parent 2514814851
commit d2349b32ec
4 changed files with 29 additions and 9 deletions

View File

@@ -475,8 +475,11 @@ static int pmu_process_init_msg(struct nvgpu_pmu *pmu,
nvgpu_pmu_allocator_dmem_init(g, pmu, &pmu->dmem, init);
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_PMU_SUPER_SURFACE)) {
nvgpu_pmu_ss_create_ssmd_lookup_table(g,
err = nvgpu_pmu_ss_create_ssmd_lookup_table(g,
pmu, pmu->super_surface);
if (err != 0) {
goto exit;
}
}
nvgpu_pmu_set_fw_ready(g, pmu, true);