xref: /haiku/src/add-ons/accelerants/radeon_hd/displayport.h (revision 0de9d6cdeffaa5525911a1ecf1bcb3afb1862efb)
196587f13SAlexander von Gluck IV /*
296587f13SAlexander von Gluck IV  * Copyright 2011, Haiku, Inc. All Rights Reserved.
396587f13SAlexander von Gluck IV  * Distributed under the terms of the MIT License.
496587f13SAlexander von Gluck IV  *
596587f13SAlexander von Gluck IV  * Authors:
696587f13SAlexander von Gluck IV  *		Alexander von Gluck IV, kallisti5@unixzen.com
796587f13SAlexander von Gluck IV  */
896587f13SAlexander von Gluck IV #ifndef RADEON_HD_DISPLAYPORT_H
996587f13SAlexander von Gluck IV #define RADEON_HD_DISPLAYPORT_H
1096587f13SAlexander von Gluck IV 
1196587f13SAlexander von Gluck IV 
12c8677fb1SAlexander von Gluck IV #include <create_display_modes.h>
1396587f13SAlexander von Gluck IV #include <stdint.h>
1496587f13SAlexander von Gluck IV #include <SupportDefs.h>
1596587f13SAlexander von Gluck IV 
1683e3a8eaSAlexander von Gluck IV #include "accelerant.h"
17*0de9d6cdSAlexander von Gluck IV #include "dp.h"
18c8677fb1SAlexander von Gluck IV 
1996587f13SAlexander von Gluck IV 
20c6799d8aSAlexander von Gluck IV // Radeon HD specific DisplayPort Configuration Data
21c6799d8aSAlexander von Gluck IV #define DP_TRAINING_AUX_RD_INTERVAL 0x000e
228dfc5dbbSAlexander von Gluck IV #define DP_TPS3_SUPPORTED (1 << 6) // Stored within MAX_LANE_COUNT
23c6799d8aSAlexander von Gluck IV 
24c6799d8aSAlexander von Gluck IV 
2518500e1cSAlexander von Gluck IV int dp_aux_write(uint32 hwPin, uint16 address, uint8* send,
2696587f13SAlexander von Gluck IV 	uint8 sendBytes, uint8 delay);
2718500e1cSAlexander von Gluck IV int dp_aux_read(uint32 hwPin, uint16 address, uint8* recv,
2896587f13SAlexander von Gluck IV 	int recvBytes, uint8 delay);
2918500e1cSAlexander von Gluck IV status_t dp_aux_set_i2c_byte(uint32 hwPin, uint16 address,
3096587f13SAlexander von Gluck IV 	uint8* data, bool end);
3118500e1cSAlexander von Gluck IV status_t dp_aux_get_i2c_byte(uint32 hwPin, uint16 address,
3296587f13SAlexander von Gluck IV 	uint8* data, bool end);
3396587f13SAlexander von Gluck IV 
3496587f13SAlexander von Gluck IV uint32 dp_get_link_clock(uint32 connectorIndex);
35c8677fb1SAlexander von Gluck IV 
36f2c3cbf7SAlexander von Gluck IV void dp_setup_connectors();
37*0de9d6cdSAlexander von Gluck IV 
38c8677fb1SAlexander von Gluck IV status_t dp_link_train(uint8 crtcID, display_mode* mode);
39*0de9d6cdSAlexander von Gluck IV status_t dp_link_train_cr(uint32 connectorIndex);
4096587f13SAlexander von Gluck IV 
4196587f13SAlexander von Gluck IV 
4296587f13SAlexander von Gluck IV #endif /* RADEON_HD_DISPLAYPORT_H */
43