1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2024 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 // Bug 4459839 : This regkey will enable DSC irrespective of LT status.
84 //
85 #define NV_DP_REGKEY_FORCE_DSC_ON_SINK                 "DP_FORCE_DSC_ON_SINK"
86 #define NV_DP_REGKEY_ENABLE_SKIP_DPCD_READS_WAR        "DP_BUG_4478047_WAR"
87 
88 //
89 // Data Base used to store all the regkey values.
90 // The actual data base is declared statically in dp_evoadapter.cpp.
91 // All entries set to 0 before initialized by the first EvoMainLink constructor.
92 // The first EvoMainLink constructor will populate that data base.
93 // Later EvoMainLink will use values from that data base.
94 //
95 struct DP_REGKEY_DATABASE
96 {
97     bool  bInitialized; // set to true after the first EvoMainLink instance is constructed
98     // Below are regkey values
99     bool  bAudioBeyond48kEnabled;
100     NvU32 dpcdRevOveride;
101     bool  bSscDisabled;
102     bool  bFastLinkTrainingEnabled;
103     bool  bMstDisabled;
104     bool  bInbandStereoSignalingEnabled;
105     bool  bPoweroffEdpInHeadDetachSkipped;
106     bool  bOcaLoggingEnabled;
107     bool  bReportDeviceLostBeforeNew;
108     bool  bLinkBwOverrideWarApplied;
109     NvU32 applyMaxLinkRateOverrides;
110     bool  bDscDisabled;
111     bool  bAssesslinkForEdpSkipped;
112     bool  bHdcpAuthOnlyOnDemand;
113     bool  bMsaOverMstEnabled;
114     bool  bOptLinkKeptAlive;
115     bool  bOptLinkKeptAliveMst;
116     bool  bOptLinkKeptAliveSst;
117     bool  bBypassEDPRevCheck;
118     bool  bDscMstCapBug3143315;
119     bool  bPowerDownPhyBeforeD3;
120     bool  bReassessMaxLink;
121     bool  bMSTPCONCapsReadDisabled;
122     bool  bForceDscOnSink;
123     bool  bSkipFakeDeviceDpcdAccess;
124 };
125 
126 #endif //INCLUDED_DP_REGKEYDATABASE_H
127 
128