mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: add profiler apis for resource reservation
Add two new functions to reserve/release PM resources : nvgpu_prof_ioctl_reserve_pm_resource() nvgpu_prof_ioctl_release_pm_resource() Add ctxsw field to struct nvgpu_profiler_object to store per-resource context switch enable flag. Force resource reservation release while unbinding the context from profiler object or while closing the profiler object. Add this code in nvgpu_profiler_unbind_context() since both above paths will call this function. Bug 2510974 Jira NVGPU-5360 Change-Id: If334148e8df86360fba4162d1611187f3f04d01b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2389654 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Alex Waterman
parent
7e99a68e34
commit
330cc7d0e5
@@ -1525,10 +1525,8 @@ struct nvgpu_profiler_bind_context_args {
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
enum {
|
||||
NVGPU_PROFILER_PM_RESOURCE_ARG_HWPM_LEGACY,
|
||||
NVGPU_PROFILER_PM_RESOURCE_ARG_SMPC,
|
||||
};
|
||||
#define NVGPU_PROFILER_PM_RESOURCE_ARG_HWPM_LEGACY 0U
|
||||
#define NVGPU_PROFILER_PM_RESOURCE_ARG_SMPC 1U
|
||||
|
||||
struct nvgpu_profiler_reserve_pm_resource_args {
|
||||
__u32 resource; /* in: NVGPU_PROFILER_PM_RESOURCE_ARG_* resource to be reserved */
|
||||
|
||||
Reference in New Issue
Block a user