diff options
author | Vaibhav Kachore <vkachore@nvidia.com> | 2018-07-06 05:40:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-10 21:13:43 -0400 |
commit | e14fdcd8f1f4125da697433b1744b1e4e4f15b09 (patch) | |
tree | f48ff794ef77e977ccba397f5abf14f5ae7b185b /drivers/gpu/nvgpu/include | |
parent | 4cd59404a2d4ab1c31605d96cff848dd4e93c3b4 (diff) |
gpu: nvgpu: enable HWPM Mode-E context switch
- Write new pm mode to context buffer header. Ucode use
this mode to enable mode-e context switch. This is Mode-B
context switch of PMs with Mode-E streamout on one context.
If this mode is set, Ucode makes sure that Mode-E pipe
(perfmons, routers, pma) is idle before it context switches PMs.
- This allows us to collect counters in a secure way
(i.e. on context basis) with stream out.
Bug 2106999
Change-Id: I5a7435f09d1bf053ca428e538b0a57f3a175ac37
Signed-off-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1760366
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h index cd792835..b7f3df24 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ctxsw_prog_gv100.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -144,6 +144,10 @@ static inline u32 ctxsw_prog_main_image_pm_mode_no_ctxsw_f(void) | |||
144 | { | 144 | { |
145 | return 0x0U; | 145 | return 0x0U; |
146 | } | 146 | } |
147 | static inline u32 ctxsw_prog_main_image_pm_mode_stream_out_ctxsw_f(void) | ||
148 | { | ||
149 | return 0x2U; | ||
150 | } | ||
147 | static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void) | 151 | static inline u32 ctxsw_prog_main_image_pm_smpc_mode_m(void) |
148 | { | 152 | { |
149 | return 0x7U << 3U; | 153 | return 0x7U << 3U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h index 6d05e44c..1eb26303 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h | |||
@@ -356,6 +356,7 @@ struct tegra_vgpu_fecs_trace_filter { | |||
356 | enum { | 356 | enum { |
357 | TEGRA_VGPU_CTXSW_MODE_NO_CTXSW = 0, | 357 | TEGRA_VGPU_CTXSW_MODE_NO_CTXSW = 0, |
358 | TEGRA_VGPU_CTXSW_MODE_CTXSW, | 358 | TEGRA_VGPU_CTXSW_MODE_CTXSW, |
359 | TEGRA_VGPU_CTXSW_MODE_STREAM_OUT_CTXSW, | ||
359 | }; | 360 | }; |
360 | 361 | ||
361 | enum { | 362 | enum { |