gpu: nvgpu: fix boardobjgrp getstatus error on gv10x

Req : Some boardobjgrp don't need getstatus support, so
boardobjgrp pmu cmd not constructed for those boardobjgrp.
Don't request memory alloc if boardobjgrp pmu cmd
not constructed & should exit cleanly without allocating memory.

Fix: Don't request memory alloc if boardobjgrp pmu cmd
not constructed by checking "sturct boardobjgrp_pmu_cmd"
member "fbsize" value.

Change-Id: I610d6812ec1d1bcf7ea38645236601b3e5672650
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1674191
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mahantesh Kumbar
2018-03-13 14:55:30 +05:30
committed by mobile promotions
parent 619b1c92bc
commit 395496bd6a

View File

@@ -240,6 +240,9 @@ u32 boardobjgrp_pmucmd_pmuinithandle_impl(struct gk20a *g,
pboardobjgrp, pcmd))
goto boardobjgrp_pmucmd_pmuinithandle_exit;
if (!pcmd->fbsize)
goto boardobjgrp_pmucmd_pmuinithandle_exit;
nvgpu_pmu_sysmem_surface_alloc(g, sysmem_desc, pcmd->fbsize);
/* we only have got sysmem later this will get copied to vidmem
surface*/