mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: add check related to pmu_support
This patch performs the dereferncing of PMU from GPU driver struct only when PMU is supported. JIRA NVGPU-9283 Change-Id: I9a589cd999ff726220168cf108c7e419a5f52038 Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2854013 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
5d2f56f89f
commit
e3e80f8d26
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2022, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2016-2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -1209,9 +1209,15 @@ int nvgpu_pmu_pg_buf_alloc(struct gk20a *g, struct nvgpu_pmu *pmu, u32 size)
|
|||||||
|
|
||||||
int nvgpu_pmu_restore_golden_img_state(struct gk20a *g)
|
int nvgpu_pmu_restore_golden_img_state(struct gk20a *g)
|
||||||
{
|
{
|
||||||
struct nvgpu_pmu *pmu = g->pmu;
|
struct nvgpu_pmu *pmu;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
|
if (!g->support_ls_pmu) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
pmu = g->pmu;
|
||||||
|
|
||||||
if (!is_pg_supported(g, pmu->pg)) {
|
if (!is_pg_supported(g, pmu->pg)) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user