summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dml/display_mode_support.h
blob: d4ea0371cde20cb24ffe155cc6ce7cb92e505f47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
/*
 * Copyright 2017 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: AMD
 *
 */
#ifndef __DISPLAY_MODE_SUPPORT_H__
#define __DISPLAY_MODE_SUPPORT_H__

#include "dml_common_defs.h"

struct display_mode_lib;

#define NumberOfStates 4
#define NumberOfStatesPlusTwo (NumberOfStates+2)

struct dml_ms_internal_vars {
	double ScaleRatioSupport;
	double SourceFormatPixelAndScanSupport;
	double TotalReadBandwidthConsumedGBytePerSecond;
	double TotalWriteBandwidthConsumedGBytePerSecond;
	double TotalBandwidthConsumedGBytePerSecond;
	double DCCEnabledInAnyPlane;
	double ReturnBWToDCNPerState;
	double CriticalPoint;
	double WritebackLatencySupport;
	double RequiredOutputBW;
	double TotalNumberOfActiveWriteback;
	double TotalAvailableWritebackSupport;
	double MaximumSwathWidth;
	double NumberOfDPPRequiredForDETSize;
	double NumberOfDPPRequiredForLBSize;
	double MinDispclkUsingSingleDPP;
	double MinDispclkUsingDualDPP;
	double ViewportSizeSupport;
	double SwathWidthGranularityY;
	double RoundedUpMaxSwathSizeBytesY;
	double SwathWidthGranularityC;
	double RoundedUpMaxSwathSizeBytesC;
	double LinesInDETLuma;
	double LinesInDETChroma;
	double EffectiveLBLatencyHidingSourceLinesLuma;
	double EffectiveLBLatencyHidingSourceLinesChroma;
	double EffectiveDETLBLinesLuma;
	double EffectiveDETLBLinesChroma;
	double ProjectedDCFCLKDeepSleep;
	double MetaReqHeightY;
	double MetaReqWidthY;
	double MetaSurfaceWidthY;
	double MetaSurfaceHeightY;
	double MetaPteBytesPerFrameY;
	double MetaRowBytesY;
	double MacroTileBlockSizeBytesY;
	double MacroTileBlockHeightY;
	double DataPTEReqHeightY;
	double DataPTEReqWidthY;
	double DPTEBytesPerRowY;
	double MetaReqHeightC;
	double MetaReqWidthC;
	double MetaSurfaceWidthC;
	double MetaSurfaceHeightC;
	double MetaPteBytesPerFrameC;
	double MetaRowBytesC;
	double MacroTileBlockSizeBytesC;
	double MacroTileBlockHeightC;
	double MacroTileBlockWidthC;
	double DataPTEReqHeightC;
	double DataPTEReqWidthC;
	double DPTEBytesPerRowC;
	double VInitY;
	double MaxPartialSwY;
	double VInitC;
	double MaxPartialSwC;
	double dst_x_after_scaler;
	double dst_y_after_scaler;
	double TimeCalc;
	double VUpdateOffset;
	double TotalRepeaterDelay;
	double VUpdateWidth;
	double VReadyOffset;
	double TimeSetup;
	double ExtraLatency;
	double MaximumVStartup;
	double BWAvailableForImmediateFlip;
	double TotalImmediateFlipBytes;
	double TimeForMetaPTEWithImmediateFlip;
	double TimeForMetaPTEWithoutImmediateFlip;
	double TimeForMetaAndDPTERowWithImmediateFlip;
	double TimeForMetaAndDPTERowWithoutImmediateFlip;
	double LineTimesToRequestPrefetchPixelDataWithImmediateFlip;
	double LineTimesToRequestPrefetchPixelDataWithoutImmediateFlip;
	double MaximumReadBandwidthWithPrefetchWithImmediateFlip;
	double MaximumReadBandwidthWithPrefetchWithoutImmediateFlip;
	double VoltageOverrideLevel;
	double VoltageLevelWithImmediateFlip;
	double VoltageLevelWithoutImmediateFlip;
	double ImmediateFlipSupported;
	double VoltageLevel;
	double DCFCLK;
	double FabricAndDRAMBandwidth;
	double SwathWidthYSingleDPP[DC__NUM_PIPES__MAX];
	double BytePerPixelInDETY[DC__NUM_PIPES__MAX];
	double BytePerPixelInDETC[DC__NUM_PIPES__MAX];
	double ReadBandwidth[DC__NUM_PIPES__MAX];
	double WriteBandwidth[DC__NUM_PIPES__MAX];
	double DCFCLKPerState[NumberOfStatesPlusTwo];
	double FabricAndDRAMBandwidthPerState[NumberOfStatesPlusTwo];
	double ReturnBWPerState[NumberOfStatesPlusTwo];
	double BandwidthSupport[NumberOfStatesPlusTwo];
	double UrgentRoundTripAndOutOfOrderLatencyPerState[NumberOfStatesPlusTwo];
	double ROBSupport[NumberOfStatesPlusTwo];
	double RequiredPHYCLK[DC__NUM_PIPES__MAX];
	double DIOSupport[NumberOfStatesPlusTwo];
	double PHYCLKPerState[NumberOfStatesPlusTwo];
	double PSCL_FACTOR[DC__NUM_PIPES__MAX];
	double PSCL_FACTOR_CHROMA[DC__NUM_PIPES__MAX];
	double MinDPPCLKUsingSingleDPP[DC__NUM_PIPES__MAX];
	double Read256BlockHeightY[DC__NUM_PIPES__MAX];
	double Read256BlockWidthY[DC__NUM_PIPES__MAX];
	double Read256BlockHeightC[DC__NUM_PIPES__MAX];
	double Read256BlockWidthC[DC__NUM_PIPES__MAX];
	double MaxSwathHeightY[DC__NUM_PIPES__MAX];
	double MaxSwathHeightC[DC__NUM_PIPES__MAX];
	double MinSwathHeightY[DC__NUM_PIPES__MAX];
	double MinSwathHeightC[DC__NUM_PIPES__MAX];
	double NumberOfDPPRequiredForDETAndLBSize[DC__NUM_PIPES__MAX];
	double TotalNumberOfActiveDPP[NumberOfStatesPlusTwo * 2];
	double RequiredDISPCLK[NumberOfStatesPlusTwo * 2];
	double DISPCLK_DPPCLK_Support[NumberOfStatesPlusTwo * 2];
	double MaxDispclk[NumberOfStatesPlusTwo];
	double MaxDppclk[NumberOfStatesPlusTwo];
	double NoOfDPP[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double TotalAvailablePipesSupport[NumberOfStatesPlusTwo * 2];
	double SwathWidthYPerState[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double SwathHeightYPerState[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double SwathHeightCPerState[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double DETBufferSizeYPerState[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double UrgentLatencySupportUsPerState[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double UrgentLatencySupport[NumberOfStatesPlusTwo * 2];
	double TotalNumberOfDCCActiveDPP[NumberOfStatesPlusTwo * 2];
	double DPTEBytesPerRow[DC__NUM_PIPES__MAX];
	double MetaPTEBytesPerFrame[DC__NUM_PIPES__MAX];
	double MetaRowBytes[DC__NUM_PIPES__MAX];
	double PrefillY[DC__NUM_PIPES__MAX];
	double MaxNumSwY[DC__NUM_PIPES__MAX];
	double PrefetchLinesY[DC__NUM_PIPES__MAX];
	double PrefillC[DC__NUM_PIPES__MAX];
	double MaxNumSwC[DC__NUM_PIPES__MAX];
	double PrefetchLinesC[DC__NUM_PIPES__MAX];
	double LineTimesForPrefetch[DC__NUM_PIPES__MAX];
	double PrefetchBW[DC__NUM_PIPES__MAX];
	double LinesForMetaPTEWithImmediateFlip[DC__NUM_PIPES__MAX];
	double LinesForMetaPTEWithoutImmediateFlip[DC__NUM_PIPES__MAX];
	double LinesForMetaAndDPTERowWithImmediateFlip[DC__NUM_PIPES__MAX];
	double LinesForMetaAndDPTERowWithoutImmediateFlip[DC__NUM_PIPES__MAX];
	double VRatioPreYWithImmediateFlip[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double VRatioPreCWithImmediateFlip[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double RequiredPrefetchPixelDataBWWithImmediateFlip[NumberOfStatesPlusTwo * 2
			* DC__NUM_PIPES__MAX];
	double VRatioPreYWithoutImmediateFlip[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double VRatioPreCWithoutImmediateFlip[NumberOfStatesPlusTwo * 2 * DC__NUM_PIPES__MAX];
	double RequiredPrefetchPixelDataBWWithoutImmediateFlip[NumberOfStatesPlusTwo * 2
			* DC__NUM_PIPES__MAX];
	double PrefetchSupportedWithImmediateFlip[NumberOfStatesPlusTwo * 2];
	double PrefetchSupportedWithoutImmediateFlip[NumberOfStatesPlusTwo * 2];
	double VRatioInPrefetchSupportedWithImmediateFlip[NumberOfStatesPlusTwo * 2];
	double VRatioInPrefetchSupportedWithoutImmediateFlip[NumberOfStatesPlusTwo * 2];
	double ModeSupportWithImmediateFlip[NumberOfStatesPlusTwo * 2];
	double ModeSupportWithoutImmediateFlip[NumberOfStatesPlusTwo * 2];
	double RequiredDISPCLKPerRatio[2];
	double DPPPerPlanePerRatio[2 * DC__NUM_PIPES__MAX];
	double DISPCLK_DPPCLK_SupportPerRatio[2];
	struct _vcs_dpi_wm_calc_pipe_params_st planes[DC__NUM_PIPES__MAX];
};

#endif