diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2016-11-07 13:17:56 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-12-15 13:15:00 -0500 |
commit | ec011cd1ee2fb3389d96ba717ad549cd12c69db1 (patch) | |
tree | 5d55b26e9b2e7bb2949b20feb50f3828e7dfcc99 /drivers | |
parent | 0250221955bca63ad1ff7e3474e4886132cf8445 (diff) |
gpu: nvgpu: add device alarms
Add event definitions for:
- Clock alarm (target frequency not met)
- Thermal alarm (temperature above threshold)
- Power alarm (power above threshold)
- GPU shut down
Jira DNVGPU-186
Change-Id: I52edd44352ed0cba83033949272f41cc9e1c630f
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/1249342
(cherry picked from commit 67a6681aade241ff24982771778f7e2193d1cd7f)
Reviewed-on: http://git-master/r/1267157
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c index 6768dbeb..5660f521 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | |||
@@ -1158,9 +1158,9 @@ static int nvgpu_gpu_clk_get_info(struct gk20a *g, | |||
1158 | return 0; | 1158 | return 0; |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | static int nvgpu_gpu_clk_get_event_fd(struct gk20a *g, | 1161 | static int nvgpu_gpu_get_event_fd(struct gk20a *g, |
1162 | struct gk20a_ctrl_priv *priv, | 1162 | struct gk20a_ctrl_priv *priv, |
1163 | struct nvgpu_gpu_clk_get_event_fd_args *args) | 1163 | struct nvgpu_gpu_get_event_fd_args *args) |
1164 | { | 1164 | { |
1165 | struct nvgpu_clk_session *session = priv->clk_session; | 1165 | struct nvgpu_clk_session *session = priv->clk_session; |
1166 | 1166 | ||
@@ -1567,9 +1567,9 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg | |||
1567 | (struct nvgpu_gpu_clk_get_info_args *)buf); | 1567 | (struct nvgpu_gpu_clk_get_info_args *)buf); |
1568 | break; | 1568 | break; |
1569 | 1569 | ||
1570 | case NVGPU_GPU_IOCTL_CLK_GET_EVENT_FD: | 1570 | case NVGPU_GPU_IOCTL_GET_EVENT_FD: |
1571 | err = nvgpu_gpu_clk_get_event_fd(g, priv, | 1571 | err = nvgpu_gpu_get_event_fd(g, priv, |
1572 | (struct nvgpu_gpu_clk_get_event_fd_args *)buf); | 1572 | (struct nvgpu_gpu_get_event_fd_args *)buf); |
1573 | break; | 1573 | break; |
1574 | 1574 | ||
1575 | case NVGPU_GPU_IOCTL_GET_VOLTAGE: | 1575 | case NVGPU_GPU_IOCTL_GET_VOLTAGE: |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 68a358d8..5ed854d3 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -2071,6 +2071,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
2071 | gpu->dbg_gpu_ioctl_nr_last = NVGPU_DBG_GPU_IOCTL_LAST; | 2071 | gpu->dbg_gpu_ioctl_nr_last = NVGPU_DBG_GPU_IOCTL_LAST; |
2072 | gpu->ioctl_channel_nr_last = NVGPU_IOCTL_CHANNEL_LAST; | 2072 | gpu->ioctl_channel_nr_last = NVGPU_IOCTL_CHANNEL_LAST; |
2073 | gpu->as_ioctl_nr_last = NVGPU_AS_IOCTL_LAST; | 2073 | gpu->as_ioctl_nr_last = NVGPU_AS_IOCTL_LAST; |
2074 | gpu->event_ioctl_nr_last = NVGPU_EVENT_IOCTL_LAST; | ||
2074 | gpu->gpu_va_bit_count = 40; | 2075 | gpu->gpu_va_bit_count = 40; |
2075 | 2076 | ||
2076 | strlcpy(gpu->chipname, g->ops.name, sizeof(gpu->chipname)); | 2077 | strlcpy(gpu->chipname, g->ops.name, sizeof(gpu->chipname)); |