summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-10-25 06:57:19 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-11-03 12:15:39 -0400
commit3ec909036af46fbe582c50e486beb2bded42b645 (patch)
tree5b652aed11d537462f1850d528fdc6e7058a17e5 /drivers/gpu/nvgpu/pmuif/gpmuiftherm.h
parent8531eb6df14ac0a92d3ed44a4dedd5d283f24c5b (diff)
gpu: nvgpu: Add PMU thermal RPC for WARN_TEMP
Added PMU thermal slct RPC handling for WARN_TEMP threshold configuration. JIRA DNVGPU-130 Change-Id: I5011db5f08476516f72722e639838e968e7e60dd Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1242132 (cherry picked from commit 6e87a23ca04be435107da801c15f7b55a1f45e8b) Reviewed-on: http://git-master/r/1246211 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pmuif/gpmuiftherm.h')
-rw-r--r--drivers/gpu/nvgpu/pmuif/gpmuiftherm.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h b/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h
new file mode 100644
index 00000000..9c10e93c
--- /dev/null
+++ b/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h
@@ -0,0 +1,71 @@
1/*
2* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3*
4* This program is free software; you can redistribute it and/or modify it
5* under the terms and conditions of the GNU General Public License,
6* version 2, as published by the Free Software Foundation.
7*
8* This program is distributed in the hope it will be useful, but WITHOUT
9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11* more details.
12*/
13
14#ifndef _GPMUIFTHERM_H_
15#define _GPMUIFTHERM_H_
16
17#include "gk20a/pmu_common.h"
18
19#define NV_PMU_THERM_CMD_ID_RPC 0x00000002
20#define NV_PMU_THERM_MSG_ID_RPC 0x00000002
21#define NV_PMU_THERM_RPC_ID_SLCT_EVENT_TEMP_TH_SET 0x00000006
22#define NV_PMU_THERM_EVENT_THERMAL_1 0x00000004
23
24struct nv_pmu_therm_rpc_slct_event_temp_th_set {
25 s32 temp_threshold;
26 u8 event_id;
27 flcn_status flcn_stat;
28};
29
30struct nv_pmu_therm_rpc {
31 u8 function;
32 bool b_supported;
33 union {
34 struct nv_pmu_therm_rpc_slct_event_temp_th_set slct_event_temp_th_set;
35 } params;
36};
37
38struct nv_pmu_therm_cmd_rpc {
39 u8 cmd_type;
40 u8 pad[3];
41 struct nv_pmu_allocation request;
42};
43
44#define NV_PMU_THERM_CMD_RPC_ALLOC_OFFSET \
45 offsetof(struct nv_pmu_therm_cmd_rpc, request)
46
47struct nv_pmu_therm_cmd {
48 union {
49 u8 cmd_type;
50 struct nv_pmu_therm_cmd_rpc rpc;
51 };
52};
53
54struct nv_pmu_therm_msg_rpc {
55 u8 msg_type;
56 u8 rsvd[3];
57 struct nv_pmu_allocation response;
58};
59
60#define NV_PMU_THERM_MSG_RPC_ALLOC_OFFSET \
61 offsetof(struct nv_pmu_therm_msg_rpc, response)
62
63struct nv_pmu_therm_msg {
64 union {
65 u8 msg_type;
66 struct nv_pmu_therm_msg_rpc rpc;
67 };
68};
69
70#endif
71