1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-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 /******************************* DisplayPort *******************************\
25 *                                                                           *
26 * Module: dp_regkeydatabase.h                                               *
27 *    Definition of the DP_REGKEY_DATABASE                                   *
28 *                                                                           *
29 \***************************************************************************/
30 
31 #ifndef INCLUDED_DP_REGKEYDATABASE_H
32 #define INCLUDED_DP_REGKEYDATABASE_H
33 
34 #include "dp_auxdefs.h"
35 
36 // Regkey Names
37 #define NV_DP_REGKEY_ENABLE_AUDIO_BEYOND_48K          "ENABLE_AUDIO_BEYOND48K"
38 #define NV_DP_REGKEY_OVERRIDE_DPCD_REV                "OVERRIDE_DPCD_REV"
39 #define NV_DP_REGKEY_DISABLE_SSC                      "DISABLE_SSC"
40 #define NV_DP_REGKEY_ENABLE_FAST_LINK_TRAINING        "ENABLE_FAST_LINK_TRAINING"
41 #define NV_DP_REGKEY_DISABLE_MST                      "DISABLE_MST"
42 #define NV_DP_REGKEY_ENABLE_INBAND_STEREO_SIGNALING   "ENABLE_INBAND_STEREO_SIGNALING"
43 #define NV_DP_REGKEY_SKIP_POWEROFF_EDP_IN_HEAD_DETACH "SKIP_POWEROFF_EDP_IN_HEAD_DETACH"
44 #define NV_DP_REGKEY_ENABLE_OCA_LOGGING               "ENABLE_OCA_LOGGING"
45 #define NV_DP_REGKEY_REPORT_DEVICE_LOST_BEFORE_NEW    "HP_WAR_1707690"
46 #define NV_DP_REGKEY_APPLY_LINK_BW_OVERRIDE_WAR       "APPLY_LINK_BW_OVERRIDE_WAR"
47 #define NV_DP_REGKEY_APPLY_MAX_LINK_RATE_OVERRIDES    "APPLY_OVERRIDES_FOR_BUG_2489143"
48 #define NV_DP_REGKEY_DISABLE_DSC                      "DISABLE_DSC"
49 #define NV_DP_REGKEY_SKIP_ASSESSLINK_FOR_EDP          "HP_WAR_2189772"
50 #define NV_DP_REGKEY_HDCP_AUTH_ONLY_ON_DEMAND         "DP_HDCP_AUTH_ONLY_ON_DEMAND"
51 #define NV_DP_REGKEY_ENABLE_MSA_OVER_MST              "ENABLE_MSA_OVER_MST"
52 
53 // Keep link alive for SST and MST
54 #define NV_DP_REGKEY_KEEP_OPT_LINK_ALIVE              "DP_KEEP_OPT_LINK_ALIVE"
55 // Keep link alive when connector is in MST
56 #define NV_DP_REGKEY_KEEP_OPT_LINK_ALIVE_MST          "DP_KEEP_OPT_LINK_ALIVE_MST"
57 // Keep link alive when connector is in SST
58 #define NV_DP_REGKEY_KEEP_OPT_LINK_ALIVE_SST          "DP_KEEP_OPT_LINK_ALIVE_SST"
59 
60 #define NV_DP_REGKEY_FORCE_EDP_ILR                    "DP_BYPASS_EDP_ILR_REV_CHECK"
61 
62 // Message to power down video stream before power down link (set D3)
63 #define NV_DP_REGKEY_POWER_DOWN_PHY                   "DP_POWER_DOWN_PHY"
64 
65 //
66 // Regkey to re-assess max link if the first assessed link config
67 // is lower than the panel max
68 //
69 #define NV_DP_REGKEY_REASSESS_MAX_LINK                "DP_REASSESS_MAX_LINK"
70 
71 //
72 // DSC capability of downstream device should be decided based on device's own
73 // and its parent's DSC capability.
74 //
75 #define NV_DP_DSC_MST_CAP_BUG_3143315                  "DP_DSC_MST_CAP_BUG_3143315"
76 
77 //
78 // Bug 4388987 : This regkey will disable reading PCON caps for MST.
79 //
80 #define NV_DP_REGKEY_MST_PCON_CAPS_READ_DISABLED       "DP_BUG_4388987_WAR"
81 
82 //
83 // Data Base used to store all the regkey values.
84 // The actual data base is declared statically in dp_evoadapter.cpp.
85 // All entries set to 0 before initialized by the first EvoMainLink constructor.
86 // The first EvoMainLink constructor will populate that data base.
87 // Later EvoMainLink will use values from that data base.
88 //
89 struct DP_REGKEY_DATABASE
90 {
91     bool  bInitialized; // set to true after the first EvoMainLink instance is constructed
92     // Below are regkey values
93     bool  bAudioBeyond48kEnabled;
94     NvU32 dpcdRevOveride;
95     bool  bSscDisabled;
96     bool  bFastLinkTrainingEnabled;
97     bool  bMstDisabled;
98     bool  bInbandStereoSignalingEnabled;
99     bool  bPoweroffEdpInHeadDetachSkipped;
100     bool  bOcaLoggingEnabled;
101     bool  bReportDeviceLostBeforeNew;
102     bool  bLinkBwOverrideWarApplied;
103     NvU32 applyMaxLinkRateOverrides;
104     bool  bDscDisabled;
105     bool  bAssesslinkForEdpSkipped;
106     bool  bHdcpAuthOnlyOnDemand;
107     bool  bMsaOverMstEnabled;
108     bool  bOptLinkKeptAlive;
109     bool  bOptLinkKeptAliveMst;
110     bool  bOptLinkKeptAliveSst;
111     bool  bBypassEDPRevCheck;
112     bool  bDscMstCapBug3143315;
113     bool  bPowerDownPhyBeforeD3;
114     bool  bReassessMaxLink;
115     bool  bMSTPCONCapsReadDisabled;
116 };
117 
118 #endif //INCLUDED_DP_REGKEYDATABASE_H
119 
120