2 * Copyright 2011-2013, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Alexander von Gluck IV, kallisti5@unixzen.com
7 * Bill Randle, billr@neocat.org
9 #ifndef RADEON_HD_DISPLAYPORT_H
10 #define RADEON_HD_DISPLAYPORT_H
13 #include <create_display_modes.h>
15 #include <SupportDefs.h>
17 #include "accelerant.h"
21 // Radeon HD specific DisplayPort Configuration Data
22 #define DP_TRAINING_AUX_RD_INTERVAL 0x000e
23 #define DP_TPS3_SUPPORTED (1 << 6) // Stored within MAX_LANE_COUNT
26 uint8
dpcd_reg_read(uint32 connectorIndex
, uint16 address
);
27 void dpcd_reg_write(uint32 connectorIndex
, uint16 address
, uint8 value
);
29 // Communication over DisplayPort AUX channel
30 status_t
dp_aux_transaction(uint32 connectorIndex
, dp_aux_msg
* message
);
32 status_t
dp_aux_set_i2c_byte(uint32 connectorIndex
, uint16 address
,
33 uint8
* data
, bool start
, bool stop
);
34 status_t
dp_aux_get_i2c_byte(uint32 connectorIndex
, uint16 address
,
35 uint8
* data
, bool start
, bool stop
);
37 uint32
dp_get_link_rate(uint32 connectorIndex
, display_mode
* mode
);
38 uint32
dp_get_lane_count(uint32 connectorIndex
, display_mode
* mode
);
39 uint32
dp_get_encoder_config(uint32 connectorIndex
);
40 uint8
dp_get_sink_type(uint32 connectorIndex
);
42 void dp_setup_connectors();
44 status_t
dp_link_train(uint8 crtcID
);
45 status_t
dp_link_train_cr(uint32 connectorIndex
);
46 status_t
dp_link_train_ce(uint32 connectorIndex
, bool tp3Support
);
48 bool dp_is_dp12_capable(uint32 connectorIndex
);
52 status_t
dp_get_pixel_size_for(color_space space
, size_t *pixelChunk
,
53 size_t *rowAlignment
, size_t *pixelsPerChunk
);
55 bool ddc2_dp_read_edid1(uint32 connectorIndex
, edid1_info
*edid
);
58 #endif /* RADEON_HD_DISPLAYPORT_H */