From fd02ab4d540ef473df1fe189653cc521876663d6 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Fri, 17 Mar 2017 11:36:19 -0700 Subject: gpu: nvgpu: vgpu: profiler reservation support Support for hwpm reservations in the virtual case: - Add session ops for checking and setting global and context reservations, and releasing reservations - in the native case, these just update reservation counts and flags - in the vgpu case, when the reservation count is 0, check with the RM server that a reservation is possible: for global reservations, no other guest can have a reservation; for context reservations, no other guest can have a global reservation - in the vgpu case, when the reservation count is decremented to 0, notify the RM server that the guest no longer has any reservations Bug 1775465 JIRA VFND-3428 Change-Id: Idf115b730e465e35d0745c96a8f8ab6b645c7cae Signed-off-by: Peter Daifuku Reviewed-on: http://git-master/r/1323375 Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/linux/tegra_vgpu.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/linux/tegra_vgpu.h') diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h index c0964083..bb9bdcab 100644 --- a/include/linux/tegra_vgpu.h +++ b/include/linux/tegra_vgpu.h @@ -102,6 +102,7 @@ enum { TEGRA_VGPU_CMD_SUSPEND_CONTEXTS = 66, TEGRA_VGPU_CMD_RESUME_CONTEXTS = 67, TEGRA_VGPU_CMD_CLEAR_SM_ERROR_STATE = 68, + TEGRA_VGPU_CMD_PROF_MGT = 72, }; struct tegra_vgpu_connect_params { @@ -469,6 +470,16 @@ struct tegra_vgpu_clear_sm_error_state { u32 sm_id; }; +enum { + TEGRA_VGPU_PROF_GET_GLOBAL = 0, + TEGRA_VGPU_PROF_GET_CONTEXT, + TEGRA_VGPU_PROF_RELEASE +}; + +struct tegra_vgpu_prof_mgt_params { + u32 mode; +}; + struct tegra_vgpu_cmd_msg { u32 cmd; int ret; @@ -518,6 +529,7 @@ struct tegra_vgpu_cmd_msg { struct tegra_vgpu_suspend_resume_contexts suspend_contexts; struct tegra_vgpu_suspend_resume_contexts resume_contexts; struct tegra_vgpu_clear_sm_error_state clear_sm_error_state; + struct tegra_vgpu_prof_mgt_params prof_management; char padding[192]; } params; }; -- cgit v1.2.2