blob: 1029177c26dfe515fdeecedf7d90c898c6537679 [file] [log] [blame]
Nico Huber8c45bcf2016-11-20 17:30:57 +01001--
Nico Huber3be61d42017-01-09 13:58:18 +01002-- Copyright (C) 2015-2017 secunet Security Networks AG
Nico Huber8c45bcf2016-11-20 17:30:57 +01003--
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
6-- the Free Software Foundation; either version 2 of the License, or
7-- (at your option) any later version.
8--
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
15with HW;
16
17private package HW.GFX.GMA.Config_Helpers
18is
19
Nico Huber3be61d42017-01-09 13:58:18 +010020 function To_GPU_Port
21 (Pipe : Pipe_Index;
22 Port : Active_Port_Type)
23 return GPU_Port;
24
Nico Huber8c45bcf2016-11-20 17:30:57 +010025 function To_PCH_Port (Port : Active_Port_Type) return PCH_Port;
26
27 function To_Display_Type (Port : Active_Port_Type) return Display_Type;
28
29 procedure Fill_Port_Config
30 (Port_Cfg : out Port_Config;
31 Pipe : in Pipe_Index;
32 Port : in Port_Type;
33 Mode : in Mode_Type;
34 Success : out Boolean);
35
36 ----------------------------------------------------------------------------
37
38 use type HW.Pos32;
39 function Validate_Config
40 (Framebuffer : Framebuffer_Type;
41 Port_Cfg : Port_Config;
42 Pipe : Pipe_Index)
43 return Boolean
44 with
45 Post =>
46 (if Validate_Config'Result then
47 Framebuffer.Width <= Pos32 (Port_Cfg.Mode.H_Visible) and
48 Framebuffer.Height <= Pos32 (Port_Cfg.Mode.V_Visible));
49
50end HW.GFX.GMA.Config_Helpers;