/* Watch out, this is really messy (see AppleIntelFramebufferController::MapFBToPort).
* I am not fully sure why this exists, and recommend setting index to array index (i.e. the sequential number from 0).
*
* The only accepted values are 0, 1, 2, 3, and -1 (0xFF). When index is equal to array index the logic is simple:
* Port with index 0 is always considered built-in (of LVDS type) regardless of any other values.
* Ports with indexes 1~3 are checked against type, HDMI will allow the use of digital audio, otherwise DP is assumed.
* Port with index 0xFF is ignored and skipped.
*
* When index != array index port type will be read from connector[index].type.
* Say, we have 2 active ports:
* 0 - [1] busId 4 type LVDS
* 1 - [2] busId 5 type DP
* 2 - [3] busId 6 type HDMI
* 3 - [-1] busId 0 type Dummy
* This will result in 2 framebuffers which types will be shifted:
* 0 - busId 4 type DP
* 1 - busId 5 type HDMI
* In fact BusId values are also read as connector[index].busId, but are later mapped back via
* AppleIntelFramebufferController::getGMBusIDfromPort by looking up a connector with the specified index.
* The lookup will stop as soon as a special marker connector (-1) is found. To illustrate, if we have 2 active ports:
* 0 - [1] busId 4 type LVDS
* 1 - [2] busId 5 type DP
* 2 - [-1] busId 6 type HDMI
* 3 - [-1] busId 0 type Dummy
* The result will be 2 framebuffers which types and the second busId will be shifted:
* 0 - busId 4 type DP
* 1 - busId 6 type HDMI
* It is also used for port-number calculation.
* - LVDS displays (more precisely, displays with CNConnectorAlwaysConnected flag set) get port-number 0.
* - Other displays go through index - port-number mapping: 1 - 5, 2 - 6, 3 - 7, or fallback to 0.
*/