| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 1 | -- |
| 2 | -- Copyright (C) 2015-2016 secunet Security Networks AG |
| 3 | -- |
| 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 Huber | 125a29e | 2016-10-18 00:23:54 +0200 | [diff] [blame] | 6 | -- the Free Software Foundation; either version 2 of the License, or |
| 7 | -- (at your option) any later version. |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 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 | |
| 15 | with HW.GFX.GMA.Config; |
| 16 | |
| 17 | private package HW.GFX.GMA.PCH is |
| 18 | |
| 19 | type FDI_Port_Type is (FDI_A, FDI_B, FDI_C); |
| 20 | |
| 21 | ---------------------------------------------------------------------------- |
| 22 | |
| 23 | -- common to all PCH outputs |
| 24 | |
| Nico Huber | 63dc919 | 2018-06-09 17:42:19 +0200 | [diff] [blame] | 25 | function PCH_TRANSCODER_SELECT_SHIFT return Natural is |
| Nico Huber | ef3b093 | 2018-06-09 18:26:38 +0200 | [diff] [blame] | 26 | (if Config.Has_New_FDI_Sink then 29 else 30); |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 27 | |
| Nico Huber | 63dc919 | 2018-06-09 17:42:19 +0200 | [diff] [blame] | 28 | function PCH_TRANSCODER_SELECT_MASK return Word32 is |
| Nico Huber | ef3b093 | 2018-06-09 18:26:38 +0200 | [diff] [blame] | 29 | (if Config.Has_New_FDI_Sink then 3 * 2 ** 29 else 1 * 2 ** 30); |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 30 | |
| Nico Huber | 63dc919 | 2018-06-09 17:42:19 +0200 | [diff] [blame] | 31 | function PCH_TRANSCODER_SELECT (Port : FDI_Port_Type) return Word32 is |
| 32 | (case Port is |
| 33 | when FDI_A => Shift_Left (0, PCH_TRANSCODER_SELECT_SHIFT), |
| 34 | when FDI_B => Shift_Left (1, PCH_TRANSCODER_SELECT_SHIFT), |
| 35 | when FDI_C => Shift_Left (2, PCH_TRANSCODER_SELECT_SHIFT)); |
| Nico Huber | 83693c8 | 2016-10-08 22:17:55 +0200 | [diff] [blame] | 36 | |
| 37 | end HW.GFX.GMA.PCH; |