xref: /open-nvidia-gpu/src/common/inc/jt.h (revision eb5c7665)
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2012-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 #ifndef JT_H
25 #define JT_H
26 
27 //
28 // JT ACPI _DSM method related definitions
29 //
30 #define JT_REVISION_ID                  0x00000103 // Revision number
31 
32 // subfunction 0 is common use: NV_ACPI_ALL_FUNC_SUPPORT
33 // #define JT_FUNC_SUPPORT                 0x00000000 // Function is supported?
34 #define JT_FUNC_CAPS                    0x00000001 // Capabilities
35 #define JT_FUNC_POLICYSELECT            0x00000002 // Query Policy Selector Status (reserved for future use)
36 #define JT_FUNC_POWERCONTROL            0x00000003 // dGPU Power Control
37 #define JT_FUNC_PLATPOLICY              0x00000004 // Query the Platform Policies (reserved for future use)
38 #define JT_FUNC_DISPLAYSTATUS           0x00000005 // Query the Display Hot-Key
39 #define JT_FUNC_MDTL                    0x00000006 // Display Hot-Key Toggle List
40 
41 //
42 // JT_FUNC_CAPS return buffer definitions
43 //
44 #define NV_JT_FUNC_CAPS_JT_ENABLED                                 0:0
45 #define NV_JT_FUNC_CAPS_JT_ENABLED_FALSE                    0x00000000
46 #define NV_JT_FUNC_CAPS_JT_ENABLED_TRUE                     0x00000001
47 #define NV_JT_FUNC_CAPS_NVSR_ENABLED                               2:1
48 #define NV_JT_FUNC_CAPS_NVSR_ENABLED_TRUE                   0x00000000
49 #define NV_JT_FUNC_CAPS_NVSR_ENABLED_FALSE                  0x00000001
50 #define NV_JT_FUNC_CAPS_PPR                                        4:3
51 #define NV_JT_FUNC_CAPS_PPR_GC6                             0x00000000
52 #define NV_JT_FUNC_CAPS_PPR_GC6S3SR                         0x00000002
53 #define NV_JT_FUNC_CAPS_SRPR                                       5:5
54 #define NV_JT_FUNC_CAPS_SRPR_PANEL                          0x00000000
55 #define NV_JT_FUNC_CAPS_SRPR_SUSPEND                        0x00000001
56 #define NV_JT_FUNC_CAPS_FBPR                                       7:6
57 #define NV_JT_FUNC_CAPS_FBPR_GC6_ON                         0x00000000
58 #define NV_JT_FUNC_CAPS_FBPR_GC6_S3                         0x00000002
59 #define NV_JT_FUNC_CAPS_GPR                                        9:8
60 #define NV_JT_FUNC_CAPS_GPR_COMBINED                        0x00000000
61 #define NV_JT_FUNC_CAPS_GPR_PERGPU                          0x00000001
62 #define NV_JT_FUNC_CAPS_GCR                                      10:10
63 #define NV_JT_FUNC_CAPS_GCR_EXTERNAL                        0x00000000
64 #define NV_JT_FUNC_CAPS_GCR_INTEGRATED                      0x00000001
65 #define NV_JT_FUNC_CAPS_PTH_ENABLED                              11:11
66 #define NV_JT_FUNC_CAPS_PTH_ENABLED_YES                     0x00000000
67 #define NV_JT_FUNC_CAPS_PTH_ENABLED_NO                      0x00000001
68 #define NV_JT_FUNC_CAPS_NOT                                      12:12
69 #define NV_JT_FUNC_CAPS_NOT_GC6DONE                         0x00000000
70 #define NV_JT_FUNC_CAPS_NOT_LINKCHANGE                      0x00000001
71 #define NV_JT_FUNC_CAPS_MSHYB_ENABLED                            13:13
72 #define NV_JT_FUNC_CAPS_MSHYB_ENABLED_FALSE                 0x00000000
73 #define NV_JT_FUNC_CAPS_MSHYB_ENABLED_TRUE                  0x00000001
74 #define NV_JT_FUNC_CAPS_RPC                                      14:14
75 #define NV_JT_FUNC_CAPS_RPC_DEFAULT                         0x00000000
76 #define NV_JT_FUNC_CAPS_RPC_FINEGRAIN                       0x00000001
77 #define NV_JT_FUNC_CAPS_GC6V                                     16:15
78 #define NV_JT_FUNC_CAPS_GC6V_GC6E                           0x00000000
79 #define NV_JT_FUNC_CAPS_GC6V_GC6A                           0x00000001
80 #define NV_JT_FUNC_CAPS_GC6V_GC6R                           0x00000002
81 #define NV_JT_FUNC_CAPS_GEI_ENABLED                              17:17
82 #define NV_JT_FUNC_CAPS_GEI_ENABLED_FALSE                   0x00000000
83 #define NV_JT_FUNC_CAPS_GEI_ENABLED_TRUE                    0x00000001
84 #define NV_JT_FUNC_CAPS_GSW_ENABLED                              18:18
85 #define NV_JT_FUNC_CAPS_GSW_ENABLED_FALSE                   0x00000000
86 #define NV_JT_FUNC_CAPS_GSW_ENABLED_TRUE                    0x00000001
87 #define NV_JT_FUNC_CAPS_REVISION_ID                              31:20
88 #define NV_JT_FUNC_CAPS_REVISION_ID_1_00                    0x00000100
89 #define NV_JT_FUNC_CAPS_REVISION_ID_1_01                    0x00000101
90 #define NV_JT_FUNC_CAPS_REVISION_ID_1_03                    0x00000103
91 #define NV_JT_FUNC_CAPS_REVISION_ID_2_00                    0x00000200
92 
93 //
94 // JT_FUNC_POWERCONTROL argument definitions (Rev 1.0)
95 //
96 
97 //
98 // GPU Power Control
99 //
100 #define NV_JT_FUNC_POWERCONTROL_GPU_POWER_CONTROL                  2:0
101 #define NV_JT_FUNC_POWERCONTROL_GPU_POWER_CONTROL_GSS       0x00000000
102 //
103 // JT_FUNC_POWERCONTROL return buffer definitions
104 //
105 #define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE                       2:0
106 #define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE_TRANSITION     0x00000000
107 #define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE_ON             0x00000001
108 #define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE_OFF            0x00000002
109 #define NV_JT_FUNC_POWERCONTROL_GPU_GC_STATE_GC6            0x00000003
110 #define NV_JT_FUNC_POWERCONTROL_GPU_POWER_STATE                    3:3
111 #define NV_JT_FUNC_POWERCONTROL_GPU_POWER_STATE_OFF         0x00000000
112 #define NV_JT_FUNC_POWERCONTROL_GPU_POWER_STATE_PWOK        0x00000001
113 
114 #endif // JT_H
115 
116