xref: /haiku/src/add-ons/accelerants/radeon_hd/connector.h (revision 7b3e89c0944ae1efa9a8fc66c7303874b7a344b2)
1 /*
2  * Copyright 2006-2011, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Alexander von Gluck, kallisti5@unixzen.com
7  */
8 #ifndef RADEON_HD_CONNECTOR_H
9 #define RADEON_HD_CONNECTOR_H
10 
11 
12 #include <video_configuration.h>
13 
14 #include "accelerant.h"
15 
16 
17 // convert radeon connector to common connector type
18 const int kConnectorConvertLegacy[] = {
19 	VIDEO_CONNECTOR_UNKNOWN,
20 	VIDEO_CONNECTOR_VGA,
21 	VIDEO_CONNECTOR_DVII,
22 	VIDEO_CONNECTOR_DVID,
23 	VIDEO_CONNECTOR_DVIA,
24 	VIDEO_CONNECTOR_SVIDEO,
25 	VIDEO_CONNECTOR_COMPOSITE,
26 	VIDEO_CONNECTOR_LVDS,
27 	VIDEO_CONNECTOR_UNKNOWN,
28 	VIDEO_CONNECTOR_UNKNOWN,
29 	VIDEO_CONNECTOR_HDMIA,
30 	VIDEO_CONNECTOR_HDMIB,
31 	VIDEO_CONNECTOR_UNKNOWN,
32 	VIDEO_CONNECTOR_UNKNOWN,
33 	VIDEO_CONNECTOR_9DIN,
34 	VIDEO_CONNECTOR_DP
35 };
36 
37 const int kConnectorConvert[] = {
38 	VIDEO_CONNECTOR_UNKNOWN,
39 	VIDEO_CONNECTOR_DVII,
40 	VIDEO_CONNECTOR_DVII,
41 	VIDEO_CONNECTOR_DVID,
42 	VIDEO_CONNECTOR_DVID,
43 	VIDEO_CONNECTOR_VGA,
44 	VIDEO_CONNECTOR_COMPOSITE,
45 	VIDEO_CONNECTOR_SVIDEO,
46 	VIDEO_CONNECTOR_UNKNOWN, // YPbPr
47 	VIDEO_CONNECTOR_UNKNOWN, // D_CONNECTOR
48 	VIDEO_CONNECTOR_9DIN,
49 	VIDEO_CONNECTOR_UNKNOWN, // SCART
50 	VIDEO_CONNECTOR_HDMIA,
51 	VIDEO_CONNECTOR_HDMIB,
52 	VIDEO_CONNECTOR_LVDS,
53 	VIDEO_CONNECTOR_9DIN,    // 7-pin din
54 	VIDEO_CONNECTOR_UNKNOWN, // PCIe?
55 	VIDEO_CONNECTOR_UNKNOWN, // Crossfire
56 	VIDEO_CONNECTOR_UNKNOWN, // HARDCODE_DVI
57 	VIDEO_CONNECTOR_DP,
58 	VIDEO_CONNECTOR_EDP,
59 	VIDEO_CONNECTOR_UNKNOWN, // MXM
60 	VIDEO_CONNECTOR_EDP,     // LVDS eDP
61 };
62 
63 
64 status_t gpio_populate();
65 bool connector_read_edid(uint32 connector, edid1_info* edid);
66 bool connector_read_mode_lvds(uint32 connectorIndex, display_mode* mode);
67 
68 status_t connector_probe();
69 status_t connector_probe_legacy();
70 bool connector_is_dp(uint32 connectorIndex);
71 void debug_connectors();
72 
73 uint16 connector_pick_atom_hpdid(uint32 connectorIndex);
74 
75 
76 #endif /* RADEON_HD_CONNECTOR_H */
77