nvgpu: Expose HES PM resource

This patch adds the HES profiling resource.

Bug 3944963

Change-Id: Ie7ea4d060cfdc6803262166c1c89d0c2d155c9e3
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2901996
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Kishan Palankar <kpalankar@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
This commit is contained in:
Martin Radev
2023-05-11 11:08:49 +03:00
committed by mobile promotions
parent cad414d310
commit 789ebda23d
2 changed files with 3 additions and 0 deletions

View File

@@ -271,6 +271,8 @@ static int nvgpu_prof_ioctl_get_pm_resource_type(u32 resource,
case NVGPU_PROFILER_PM_RESOURCE_ARG_PC_SAMPLER: case NVGPU_PROFILER_PM_RESOURCE_ARG_PC_SAMPLER:
*pm_resource = NVGPU_PROFILER_PM_RESOURCE_TYPE_PC_SAMPLER; *pm_resource = NVGPU_PROFILER_PM_RESOURCE_TYPE_PC_SAMPLER;
return 0; return 0;
case NVGPU_PROFILER_PM_RESOURCE_ARG_HES_CWD:
return -EINVAL;
default: default:
break; break;
} }

View File

@@ -803,6 +803,7 @@ struct nvgpu_profiler_bind_context_args {
#define NVGPU_PROFILER_PM_RESOURCE_ARG_HWPM_LEGACY 0U #define NVGPU_PROFILER_PM_RESOURCE_ARG_HWPM_LEGACY 0U
#define NVGPU_PROFILER_PM_RESOURCE_ARG_SMPC 1U #define NVGPU_PROFILER_PM_RESOURCE_ARG_SMPC 1U
#define NVGPU_PROFILER_PM_RESOURCE_ARG_PC_SAMPLER 2U #define NVGPU_PROFILER_PM_RESOURCE_ARG_PC_SAMPLER 2U
#define NVGPU_PROFILER_PM_RESOURCE_ARG_HES_CWD 3U
struct nvgpu_profiler_reserve_pm_resource_args { struct nvgpu_profiler_reserve_pm_resource_args {
__u32 resource; /* in: NVGPU_PROFILER_PM_RESOURCE_ARG_* resource to be reserved */ __u32 resource; /* in: NVGPU_PROFILER_PM_RESOURCE_ARG_* resource to be reserved */