From 6c35cebdcb2d14741385cfe051577882a806cdb8 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Wed, 25 Jan 2017 16:59:31 -0800 Subject: gpu: nvgpu: vgpu: suspend/resume contexts Add ability to suspend/resume contexts for a debug session (NVGPU_DBG_GPU_IOCTL_SUSPEND_RESUME_CONTEXTS), in virtualized case: - added hal function to resume contexts. - added vgpu support for suspend contexts, i.e. build a list of channel ids, and send TEGRA_VGPU_CMD_SUSPEND_CONTEXTS - added vgpu support for resume contexts, i.e. build a list of channel ids, and send TEGRA_VGPU_CMD_RESUME_CONTEXTS Bug 1791111 Change-Id: Icc1c00d94a94dab6384ac263fb811c00fa4b07bf Signed-off-by: Thomas Fleury Reviewed-on: http://git-master/r/1294761 (cherry picked from commit d17a38eda312ffa92ce92e5bafc30727a8b76c4e) Reviewed-on: http://git-master/r/1299059 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Cory Perry Tested-by: Cory Perry Reviewed-by: Terje Bergstrom --- include/linux/tegra_vgpu.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/linux/tegra_vgpu.h') diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h index 4f1c7926..9ecc44a7 100644 --- a/include/linux/tegra_vgpu.h +++ b/include/linux/tegra_vgpu.h @@ -99,6 +99,8 @@ enum { TEGRA_VGPU_CMD_CHANNEL_CYCLESTATS_SNAPSHOT = 63, TEGRA_VGPU_CMD_TSG_OPEN = 64, TEGRA_VGPU_CMD_GET_GPU_LOAD = 65, + TEGRA_VGPU_CMD_SUSPEND_CONTEXTS = 66, + TEGRA_VGPU_CMD_RESUME_CONTEXTS = 67, }; struct tegra_vgpu_connect_params { @@ -454,6 +456,12 @@ struct tegra_vgpu_gpu_load_params { u32 load; }; +struct tegra_vgpu_suspend_resume_contexts { + u32 num_channels; + u16 resident_chid; + u16 chids[]; +}; + struct tegra_vgpu_cmd_msg { u32 cmd; int ret; @@ -500,6 +508,8 @@ struct tegra_vgpu_cmd_msg { struct tegra_vgpu_constants_params constants; struct tegra_vgpu_channel_cyclestats_snapshot_params cyclestats_snapshot; struct tegra_vgpu_gpu_load_params gpu_load; + struct tegra_vgpu_suspend_resume_contexts suspend_contexts; + struct tegra_vgpu_suspend_resume_contexts resume_contexts; char padding[192]; } params; }; -- cgit v1.2.2