blob: 87126d5a80868f14444bb8b831335308a53b4dd0 [file] [log] [blame]
Nico Huber83693c82016-10-08 22:17:55 +02001--
Nico Huber3d06de82018-05-29 01:35:04 +02002-- Copyright (C) 2015-2018 secunet Security Networks AG
Nico Huber83693c82016-10-08 22:17:55 +02003--
4-- This program is free software; you can redistribute it and/or modify
5-- it under the terms of the GNU General Public License as published by
Nico Huber125a29e2016-10-18 00:23:54 +02006-- the Free Software Foundation; either version 2 of the License, or
7-- (at your option) any later version.
Nico Huber83693c82016-10-08 22:17:55 +02008--
9-- This program is distributed in the hope that it will be useful,
10-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-- GNU General Public License for more details.
13--
14
Nico Huber27088aa2018-06-10 13:28:05 +020015private package HW.GFX.GMA.Config is
Nico Huber83693c82016-10-08 22:17:55 +020016
Nico Huber6621a142018-06-07 23:56:54 +020017 Gen : constant Generation := <<GEN>>;
18
Nico Huberd7809ab2018-06-10 15:44:23 +020019 CPU_First : constant CPU_Type :=
20 (case Gen is
21 when G45 => G45,
22 when Ironlake => Ironlake,
23 when Haswell => Haswell,
24 when Broxton => Broxton,
25 when Skylake => Skylake);
26 CPU_Last : constant CPU_Type :=
27 (case Gen is
28 when G45 => G45,
29 when Ironlake => Ivybridge,
30 when Haswell => Broadwell,
31 when Broxton => Broxton,
32 when Skylake => Skylake);
33 CPU_Var_Last : constant CPU_Variant :=
34 (case Gen is
35 when Haswell | Skylake => ULT,
36 when others => Normal);
37 subtype Gen_CPU_Type is CPU_Type range CPU_First .. CPU_Last;
38 subtype Gen_CPU_Variant is CPU_Variant range Normal .. CPU_Var_Last;
Nico Huber83693c82016-10-08 22:17:55 +020039
Nico Huberd7809ab2018-06-10 15:44:23 +020040 CPU : constant Gen_CPU_Type := <<CPU>>;
41
42 CPU_Var : constant Gen_CPU_Variant := <<CPU_VARIANT>>;
Nico Huber83693c82016-10-08 22:17:55 +020043
44 Internal_Display : constant Internal_Type := <<INTERNAL_PORT>>;
45
Nico Huberd55afeb2016-10-21 14:31:10 +020046 Analog_I2C_Port : constant PCH_Port := <<ANALOG_I2C_PORT>>;
47
Nico Huber83693c82016-10-08 22:17:55 +020048 EDP_Low_Voltage_Swing : constant Boolean := False;
49
Nico Huber247adf32017-06-12 14:39:11 +020050 DDI_HDMI_Buffer_Translation : constant Integer := -1;
51
Nico Huber83693c82016-10-08 22:17:55 +020052 Default_MMIO_Base : constant := <<DEFAULT_MMIO_BASE>>;
53
54 LVDS_Dual_Threshold : constant := 95_000_000;
55
56 ----------------------------------------------------------------------------
57
Nico Huber30e84082018-06-10 13:28:05 +020058 type Valid_Port_Array is array (Port_Type) of Boolean;
59 type Variable_Config is record
60 Valid_Port : Valid_Port_Array;
61 Raw_Clock : Frequency_Type;
62 end record;
63
Nico Huber27088aa2018-06-10 13:28:05 +020064 Initial_Settings : constant Variable_Config :=
Nico Huber30e84082018-06-10 13:28:05 +020065 (Valid_Port => (others => False),
Nico Huber27088aa2018-06-10 13:28:05 +020066 Raw_Clock => Frequency_Type'First);
67
68 Variable : Variable_Config with Part_Of => GMA.Config_State;
Nico Huber30e84082018-06-10 13:28:05 +020069
70 Valid_Port : Valid_Port_Array renames Variable.Valid_Port;
71 Raw_Clock : Frequency_Type renames Variable.Raw_Clock;
72
73 ----------------------------------------------------------------------------
74
Nico Huberd9365612018-06-10 14:59:04 +020075 -- To support both static configurations, that are compiled for a
76 -- fixed CPU, and dynamic configurations, where the CPU and its
77 -- variant are detected at runtime, all derived config values are
78 -- tagged based on their dependencies.
79 --
80 -- Booleans that only depend on the generation should be tagged
81 -- <genbool>. Those that may depend on the CPU are tagged with the
82 -- generations where that is the case. For instance `CPU_Ivybridge`
83 -- can be decided purely based on the generation unless the gene-
84 -- ration is Ironlake, thus, it is tagged <ilkbool>.
85 --
86 -- For non-boolean constants, per generation tags <...var> are
87 -- used (e.g. <ilkvar>).
88 --
89 -- To ease parsing, all multiline expressions of tagged config
90 -- values start after a line break.
Nico Huber6621a142018-06-07 23:56:54 +020091
Nico Huberd9365612018-06-10 14:59:04 +020092 Gen_G45 : <genbool> := Gen = G45;
93 Gen_Ironlake : <genbool> := Gen = Ironlake;
94 Gen_Haswell : <genbool> := Gen = Haswell;
95 Gen_Broxton : <genbool> := Gen = Broxton;
96 Gen_Skylake : <genbool> := Gen = Skylake;
Nico Huber6621a142018-06-07 23:56:54 +020097
Nico Huberd9365612018-06-10 14:59:04 +020098 Up_To_Ironlake : <genbool> := Gen <= Ironlake;
99 Ironlake_On : <genbool> := Gen >= Ironlake;
100 Haswell_On : <genbool> := Gen >= Haswell;
101 Broxton_On : <genbool> := Gen >= Broxton;
102 Skylake_On : <genbool> := Gen >= Skylake;
Nico Huber998ee2b2018-06-12 23:02:17 +0200103
Nico Huberd9365612018-06-10 14:59:04 +0200104 CPU_Ironlake : <ilkbool> := Gen_Ironlake and then CPU = Ironlake;
105 CPU_Sandybridge : <ilkbool> := Gen_Ironlake and then CPU = Sandybridge;
106 CPU_Ivybridge : <ilkbool> := Gen_Ironlake and then CPU = Ivybridge;
107 CPU_Haswell : <hswbool> := Gen_Haswell and then CPU = Haswell;
108 CPU_Broadwell : <hswbool> := Gen_Haswell and then CPU = Broadwell;
109
110 Sandybridge_On : <ilkbool> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200111 ((Gen_Ironlake and then CPU >= Sandybridge) or Haswell_On);
Nico Huberd9365612018-06-10 14:59:04 +0200112 Ivybridge_On : <ilkbool> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200113 ((Gen_Ironlake and then CPU >= Ivybridge) or Haswell_On);
Nico Huberd9365612018-06-10 14:59:04 +0200114 Broadwell_On : <hswbool> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200115 ((Gen_Haswell and then CPU >= Broadwell) or Broxton_On);
116
Nico Huber6621a142018-06-07 23:56:54 +0200117 ----------------------------------------------------------------------------
118
Nico Huber117db372018-06-09 17:56:05 +0200119 Have_HDMI_Buf_Override : constant Boolean := DDI_HDMI_Buffer_Translation >= 0;
Nico Huber2b6f6992017-07-09 18:11:34 +0200120 Default_MMIO_Base_Set : constant Boolean := Default_MMIO_Base /= 0;
121
Nico Huber83693c82016-10-08 22:17:55 +0200122 Has_Internal_Display : constant Boolean := Internal_Display /= None;
Nico Huber318bca12018-06-09 19:22:52 +0200123 Internal_Is_LVDS : constant Boolean := Internal_Display = LVDS;
Nico Huber83693c82016-10-08 22:17:55 +0200124 Internal_Is_EDP : constant Boolean := Internal_Display = DP;
Nico Huber1bc496f2017-06-09 22:23:28 +0200125 Have_DVI_I : constant Boolean := Analog_I2C_Port /= PCH_DAC;
Nico Huberd9365612018-06-10 14:59:04 +0200126
127 Has_Presence_Straps : <genbool> := not Gen_Broxton;
128 Is_ULT : <hswsklbool> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200129 ((Gen_Haswell or Gen_Skylake) and then CPU_Var = ULT);
Nico Huber83693c82016-10-08 22:17:55 +0200130
Nico Huberd9365612018-06-10 14:59:04 +0200131 ---------- CPU pipe: ---------
132 Has_Tertiary_Pipe : <ilkbool> := Ivybridge_On;
133 Disable_Trickle_Feed : <genbool> := not Gen_Haswell;
134 Pipe_Enabled_Workaround : <hswbool> := CPU_Broadwell;
135 Has_EDP_Transcoder : <genbool> := Haswell_On;
136 Use_PDW_For_EDP_Scaling : <hswbool> := CPU_Haswell;
137 Has_Pipe_DDI_Func : <genbool> := Haswell_On;
138 Has_Trans_Clk_Sel : <genbool> := Haswell_On;
139 Has_Pipe_MSA_Misc : <genbool> := Haswell_On;
140 Has_Pipeconf_Misc : <hswbool> := Broadwell_On;
141 Has_Pipeconf_BPC : <hswbool> := not CPU_Haswell;
142 Has_Plane_Control : <genbool> := Broxton_On;
143 Has_DSP_Linoff : <genbool> := Up_To_Ironlake;
144 Has_PF_Pipe_Select : <ilkhswbool> := CPU_Ivybridge or CPU_Haswell;
145 Has_Cursor_FBC_Control : <ilkbool> := Ivybridge_On;
146 VGA_Plane_Workaround : <ilkbool> := CPU_Ivybridge;
147 Has_GMCH_DP_Transcoder : <genbool> := Gen_G45;
148 Has_GMCH_VGACNTRL : <genbool> := Gen_G45;
149 Has_GMCH_PFIT_CONTROL : <genbool> := Gen_G45;
Nico Huber83693c82016-10-08 22:17:55 +0200150
Nico Huberd9365612018-06-10 14:59:04 +0200151 --------- Panel power: -------
152 Has_PP_Write_Protection : <genbool> := Up_To_Ironlake;
153 Has_PP_Port_Select : <genbool> := Up_To_Ironlake;
154 Use_PP_VDD_Override : <genbool> := Up_To_Ironlake;
155 Has_PCH_Panel_Power : <genbool> := Ironlake_On;
Nico Huber83693c82016-10-08 22:17:55 +0200156
Nico Huberd9365612018-06-10 14:59:04 +0200157 ----------- PCH/FDI: ---------
158 Has_PCH : <genbool> := not Gen_Broxton and not Gen_G45;
159 Has_PCH_DAC : <hswbool> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200160 (Gen_Ironlake or (Gen_Haswell and then not Is_ULT));
Nico Huber83693c82016-10-08 22:17:55 +0200161
Nico Huberd9365612018-06-10 14:59:04 +0200162 Has_PCH_Aux_Channels : <genbool> := Gen_Ironlake or Gen_Haswell;
Nico Huber83693c82016-10-08 22:17:55 +0200163
Nico Huberd9365612018-06-10 14:59:04 +0200164 VGA_Has_Sync_Disable : <genbool> := Up_To_Ironlake;
Nico Huber83693c82016-10-08 22:17:55 +0200165
Nico Huberd9365612018-06-10 14:59:04 +0200166 Has_Trans_Timing_Ovrrde : <ilkbool> := Sandybridge_On;
Nico Huber83693c82016-10-08 22:17:55 +0200167
Nico Huberd9365612018-06-10 14:59:04 +0200168 Has_DPLL_SEL : <genbool> := Gen_Ironlake;
169 Has_FDI_BPC : <genbool> := Gen_Ironlake;
170 Has_FDI_Composite_Sel : <ilkbool> := CPU_Ivybridge;
171 Has_New_FDI_Sink : <ilkbool> := Sandybridge_On;
172 Has_New_FDI_Source : <ilkbool> := Ivybridge_On;
173 Has_Trans_DP_Ctl : <ilkbool> := CPU_Sandybridge or CPU_Ivybridge;
174 Has_FDI_C : <ilkbool> := CPU_Ivybridge;
Nico Huber83693c82016-10-08 22:17:55 +0200175
Nico Huberd9365612018-06-10 14:59:04 +0200176 Has_FDI_RX_Power_Down : <genbool> := Gen_Haswell;
Nico Huber83693c82016-10-08 22:17:55 +0200177
Nico Huberd9365612018-06-10 14:59:04 +0200178 Has_GMCH_RawClk : <genbool> := Gen_G45;
Arthur Heymans73ea0322018-03-28 17:17:07 +0200179
Nico Huberd9365612018-06-10 14:59:04 +0200180 ----------- DDI: -------------
181 End_EDP_Training_Late : <genbool> := Gen_Haswell;
182 Has_Per_DDI_Clock_Sel : <genbool> := Gen_Haswell;
183 Has_HOTPLUG_CTL : <genbool> := Gen_Haswell;
184 Has_SHOTPLUG_CTL_A : <hswbool> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200185 ((Gen_Haswell and then Is_ULT) or Skylake_On);
Nico Huber83693c82016-10-08 22:17:55 +0200186
Nico Huberd9365612018-06-10 14:59:04 +0200187 Has_DDI_PHYs : <genbool> := Gen_Broxton;
Nico Huber19729a72017-07-30 01:05:05 +0200188
Nico Huberd9365612018-06-10 14:59:04 +0200189 Has_DDI_D : <hswsklbool> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200190 ((Gen_Haswell or Gen_Skylake) and then not Is_ULT);
Nico Huberd9365612018-06-10 14:59:04 +0200191 -- might be disabled by x4 eDP:
192 Has_DDI_E : <hswsklbool> := Has_DDI_D;
Nico Huber83693c82016-10-08 22:17:55 +0200193
Nico Huberd9365612018-06-10 14:59:04 +0200194 Has_DDI_Buffer_Trans : <genbool> := Haswell_On and not Has_DDI_PHYs;
195 Has_Low_Voltage_Swing : <genbool> := Broxton_On;
196 Has_Iboost_Config : <genbool> := Skylake_On;
Nico Huber83693c82016-10-08 22:17:55 +0200197
Nico Huberd9365612018-06-10 14:59:04 +0200198 Need_DP_Aux_Mutex : <genbool> := False; -- Skylake & (PSR | GTC)
Nico Huber83693c82016-10-08 22:17:55 +0200199
Nico Huberd9365612018-06-10 14:59:04 +0200200 ----------- GMBUS: -----------
201 Ungate_GMBUS_Unit_Level : <genbool> := Skylake_On;
202 GMBUS_Alternative_Pins : <genbool> := Gen_Broxton;
203 Has_PCH_GMBUS : <genbool> := Ironlake_On;
Nico Huber83693c82016-10-08 22:17:55 +0200204
Nico Huberd9365612018-06-10 14:59:04 +0200205 ----------- Power: -----------
206 Has_IPS : <hswbool> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200207 (Gen_Haswell and then
208 ((CPU_Haswell and Is_ULT) or CPU_Broadwell));
Nico Huberd9365612018-06-10 14:59:04 +0200209 Has_IPS_CTL_Mailbox : <hswbool> := CPU_Broadwell;
Nico Huber83693c82016-10-08 22:17:55 +0200210
Nico Huberd9365612018-06-10 14:59:04 +0200211 Has_Per_Pipe_SRD : <hswbool> := Broadwell_On;
Nico Huber83693c82016-10-08 22:17:55 +0200212
Nico Huberd9365612018-06-10 14:59:04 +0200213 ----------- GTT: -------------
214 Has_64bit_GTT : <hswbool> := Broadwell_On;
Nico Huber83693c82016-10-08 22:17:55 +0200215
216 ----------------------------------------------------------------------------
217
Nico Huberd9365612018-06-10 14:59:04 +0200218 Max_Pipe : <ilkvar> Pipe_Index :=
Nico Huberd58de7d2018-06-07 23:06:55 +0200219 (if Has_Tertiary_Pipe then Tertiary else Secondary);
Nico Huber83693c82016-10-08 22:17:55 +0200220
Nico Huberd9365612018-06-10 14:59:04 +0200221 Last_Digital_Port : <hswsklvar> Digital_Port :=
Nico Huber208857d2017-07-29 21:30:24 +0200222 (if Has_DDI_E then DIGI_E else DIGI_C);
Nico Huberac455ad2017-02-14 14:41:19 +0100223
Nico Huber83693c82016-10-08 22:17:55 +0200224 ----------------------------------------------------------------------------
225
Nico Huber3c544ee2016-11-20 04:56:58 +0100226 type FDI_Per_Port is array (Port_Type) of Boolean;
Nico Huberd9365612018-06-10 14:59:04 +0200227 Is_FDI_Port : <hswvar> FDI_Per_Port :=
Nico Huber6621a142018-06-07 23:56:54 +0200228 (Disabled => False,
229 Internal => Gen_Ironlake and Internal_Is_LVDS,
230 DP1 .. HDMI3 => Gen_Ironlake,
231 Analog => Has_PCH_DAC);
Nico Huber83693c82016-10-08 22:17:55 +0200232
233 type FDI_Lanes_Per_Port is array (GPU_Port) of DP_Lane_Count;
234 FDI_Lane_Count : constant FDI_Lanes_Per_Port :=
235 (DIGI_D => DP_Lane_Count_2,
Nico Huber6621a142018-06-07 23:56:54 +0200236 others => (if Gen_Ironlake then DP_Lane_Count_4 else DP_Lane_Count_2));
Nico Huber83693c82016-10-08 22:17:55 +0200237
Nico Huberd9365612018-06-10 14:59:04 +0200238 FDI_Training : <ilkvar> FDI_Training_Type :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200239 (if CPU_Ironlake then Simple_Training
240 elsif CPU_Sandybridge then Full_Training
241 else Auto_Training);
Nico Huber83693c82016-10-08 22:17:55 +0200242
Nico Huberf54d0962016-10-20 14:17:18 +0200243 ----------------------------------------------------------------------------
244
Nico Huberd9365612018-06-10 14:59:04 +0200245 Default_DDI_HDMI_Buffer_Translation : <hswvar> DDI_HDMI_Buf_Trans_Range :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200246 (if CPU_Haswell then 6
247 elsif CPU_Broadwell then 7
248 elsif Broxton_On then 8
249 else 0);
Nico Huber247adf32017-06-12 14:39:11 +0200250
251 ----------------------------------------------------------------------------
252
Nico Huberd9365612018-06-10 14:59:04 +0200253 Default_CDClk_Freq : <ilkvar> Frequency_Type :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200254 (if Gen_G45 then 320_000_000 -- unused
255 elsif CPU_Ironlake or Gen_Haswell then 450_000_000
256 elsif CPU_Sandybridge or CPU_Ivybridge then 400_000_000
257 elsif Gen_Broxton then 288_000_000
258 elsif Gen_Skylake then 337_500_000
259 else Frequency_Type'First);
Nico Huberabe3de22016-10-20 15:03:46 +0200260
Nico Huberd9365612018-06-10 14:59:04 +0200261 Default_RawClk_Freq : <hswvar> Frequency_Type :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200262 (if Gen_G45 then 100_000_000 -- unused, depends on FSB
263 elsif Gen_Ironlake then 125_000_000
264 elsif Gen_Haswell then (if Is_ULT then 24_000_000 else 125_000_000)
265 elsif Gen_Broxton then Frequency_Type'First -- none needed
266 elsif Gen_Skylake then 24_000_000
267 else Frequency_Type'First);
Nico Huberf54d0962016-10-20 14:17:18 +0200268
Nico Huberdcd274b2016-11-03 20:15:39 +0100269 ----------------------------------------------------------------------------
270
271 -- Maximum source width with enabled scaler. This only accounts
272 -- for simple 1:1 pipe:scaler mappings.
273
Nico Huberc5c767a2018-06-03 01:09:04 +0200274 type Width_Per_Pipe is array (Pipe_Index) of Width_Type;
Nico Huberdcd274b2016-11-03 20:15:39 +0100275
Nico Huberd9365612018-06-10 14:59:04 +0200276 Maximum_Scalable_Width : <hswvar> Width_Per_Pipe :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200277 (if Gen_G45 then -- TODO: Is this true?
278 (Primary => 4096,
279 Secondary => 2048,
280 Tertiary => Pos32'First)
281 elsif Gen_Ironlake or CPU_Haswell then
282 (Primary => 4096,
283 Secondary => 2048,
284 Tertiary => 2048)
285 else
286 (Primary => 4096,
287 Secondary => 4096,
288 Tertiary => 4096));
Nico Huberdcd274b2016-11-03 20:15:39 +0100289
Nico Hubera02b2c62018-01-09 15:58:34 +0100290 -- Maximum X position of hardware cursors
Nico Huberd9365612018-06-10 14:59:04 +0200291 Maximum_Cursor_X : constant :=
292 (case Gen is
293 when G45 .. Ironlake => 4095,
294 when Haswell .. Skylake => 8191);
Nico Hubera02b2c62018-01-09 15:58:34 +0100295
296 Maximum_Cursor_Y : constant := 4095;
297
Nico Huber74ec9622016-11-19 03:00:43 +0100298 ----------------------------------------------------------------------------
299
Nico Huber21da5742017-01-20 14:00:53 +0100300 -- FIXME: Unknown for Broxton, Linux' i915 contains a fixme too :-D
Nico Huber74ec9622016-11-19 03:00:43 +0100301 HDMI_Max_Clock_24bpp : constant Frequency_Type :=
Nico Huber6621a142018-06-07 23:56:54 +0200302 (if Haswell_On then 300_000_000 else 225_000_000);
Nico Huber74ec9622016-11-19 03:00:43 +0100303
Nico Huberb8ae6182017-07-15 20:03:56 +0200304 ----------------------------------------------------------------------------
305
Nico Huberd9365612018-06-10 14:59:04 +0200306 GTT_PTE_Size : <hswvar> := (if Has_64bit_GTT then 8 else 4);
Nico Huberb8ae6182017-07-15 20:03:56 +0200307
Nico Huberd9365612018-06-10 14:59:04 +0200308 Fence_Base : <ilkvar> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200309 (if not Sandybridge_On then 16#0000_3000# else 16#0010_0000#);
Nico Huberb03c8f12017-08-25 13:29:08 +0200310
Nico Huberd9365612018-06-10 14:59:04 +0200311 Fence_Count : <ilkvar> :=
Nico Huber998ee2b2018-06-12 23:02:17 +0200312 (if not Ivybridge_On then 16 else 32);
Nico Huberb03c8f12017-08-25 13:29:08 +0200313
Nico Hubere7ac6eb2017-09-04 23:54:13 +0200314 ----------------------------------------------------------------------------
315
316 use type HW.Word16;
317
318 function Is_Broadwell_H (Device_Id : Word16) return Boolean is
319 (Device_Id = 16#1612# or Device_Id = 16#1622# or Device_Id = 16#162a#);
320
321 function Is_Skylake_U (Device_Id : Word16) return Boolean is
322 (Device_Id = 16#1906# or Device_Id = 16#1916# or Device_Id = 16#1923# or
323 Device_Id = 16#1926# or Device_Id = 16#1927#);
324
325 -- Rather catch too much here than too little,
326 -- it's only used to distinguish generations.
327 function Is_GPU (Device_Id : Word16; CPU : CPU_Type; CPU_Var : CPU_Variant)
328 return Boolean is
329 (case CPU is
Arthur Heymans73ea0322018-03-28 17:17:07 +0200330 when G45 => (Device_Id and 16#ff02#) = 16#2e02# or
331 (Device_Id and 16#fffe#) = 16#2a42#,
Nico Hubere7ac6eb2017-09-04 23:54:13 +0200332 when Ironlake => (Device_Id and 16#fff3#) = 16#0042#,
333 when Sandybridge => (Device_Id and 16#ffc2#) = 16#0102#,
334 when Ivybridge => (Device_Id and 16#ffc3#) = 16#0142#,
335 when Haswell =>
336 (case CPU_Var is
337 when Normal => (Device_Id and 16#ffc3#) = 16#0402# or
338 (Device_Id and 16#ffc3#) = 16#0d02#,
339 when ULT => (Device_Id and 16#ffc3#) = 16#0a02#),
340 when Broadwell => ((Device_Id and 16#ffc3#) = 16#1602# or
341 (Device_Id and 16#ffcf#) = 16#160b# or
342 (Device_Id and 16#ffcf#) = 16#160d#) and
343 (case CPU_Var is
344 when Normal => Is_Broadwell_H (Device_Id),
345 when ULT => not Is_Broadwell_H (Device_Id)),
346 when Broxton => (Device_Id and 16#fffe#) = 16#5a84#,
347 when Skylake => ((Device_Id and 16#ffc3#) = 16#1902# or
348 (Device_Id and 16#ffcf#) = 16#190b# or
349 (Device_Id and 16#ffcf#) = 16#190d# or
350 (Device_Id and 16#fff9#) = 16#1921#) and
351 (case CPU_Var is
352 when Normal => not Is_Skylake_U (Device_Id),
353 when ULT => Is_Skylake_U (Device_Id)));
354
355 function Compatible_GPU (Device_Id : Word16) return Boolean is
356 (Is_GPU (Device_Id, CPU, CPU_Var));
357
Nico Huber83693c82016-10-08 22:17:55 +0200358end HW.GFX.GMA.Config;