xref: /open-nvidia-gpu/src/common/inc/gps.h (revision eb5c7665)
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2011-2023 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 GPS_H
25 #define GPS_H
26 
27 #define GPS_REVISION_ID                   0x00000100
28 #define GPS_2X_REVISION_ID                0x00000200
29 
30 #define GPS_FUNC_SUPPORT                  0x00000000    // Bit list of supported functions
31 #define GPS_FUNC_GETOBJBYTYPE             0x00000010    // Fetch any specific Object by Type
32 #define GPS_FUNC_GETALLOBJS               0x00000011    // Fetch all Objects
33 #define GPS_FUNC_GETCALLBACKS             0x00000013    // Get system requested callbacks
34 #define GPS_FUNC_PCONTROL                 0x0000001C    // GPU power control function
35 #define GPS_FUNC_PSHARESTATUS             0x00000020    // Get system requested Power Steering settings
36 #define GPS_FUNC_GETPSS                   0x00000021    // Get _PSS object
37 #define GPS_FUNC_SETPPC                   0x00000022    // Set _PPC object
38 #define GPS_FUNC_GETPPC                   0x00000023    // Get _PPC object
39 #define GPS_FUNC_GETPPL                   0x00000024    // Get CPU package power limits
40 #define GPS_FUNC_SETPPL                   0x00000025    // Set CPU package power limits
41 #define GPS_FUNC_GETTRL                   0x00000026    // Get CPU turbo ratio limits
42 #define GPS_FUNC_SETTRL                   0x00000027    // Set CPU turbo ratio limits
43 #define GPS_FUNC_GETPPM                   0x00000028    // Get system power modes
44 #define GPS_FUNC_SETPPM                   0x00000029    // Set system power modes
45 #define GPS_FUNC_PSHAREPARAMS             0x0000002A    // Get sensor information and capabilities
46 #define GPS_FUNC_SETEDPPLIMITINFO         0x0000002B    // Send the GPU EDPPeak limit info to platform
47 #define GPS_FUNC_GETEDPPLIMIT             0x0000002C    // Get EDPPeak limit from platform
48 
49 #define GPS_EVENT_STATUS_CHANGE           0x000000C0    // when received call GPS_FUNC_PCONTROL,
50                                                         // depends on whether system is GPS enabled.
51 
52 #endif // GPS_H
53 
54