radeon_hd: DP AUX address is actually 20-bit
Change-Id: Ie551c6977cb4fb8b45ad896aedd0d3c6b0b183d8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5172 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
5f90c3726b
commit
f0a63f1888
@ -34,7 +34,7 @@ typedef struct {
|
||||
} dp_info;
|
||||
|
||||
typedef struct {
|
||||
uint16 address;
|
||||
uint32 address;
|
||||
uint8 request;
|
||||
uint8 reply;
|
||||
void* buffer;
|
||||
|
@ -129,8 +129,8 @@ dp_aux_transaction(uint32 connectorIndex, dp_aux_msg* message)
|
||||
|
||||
uint8 auxMessage[20];
|
||||
auxMessage[0] = message->address & 0xff;
|
||||
auxMessage[1] = message->address >> 8;
|
||||
auxMessage[2] = message->request << 4;
|
||||
auxMessage[1] = (message->address >> 8) & 0xff;
|
||||
auxMessage[2] = (message->request << 4) | ((message->address >> 16) & 0xf);
|
||||
auxMessage[3] = message->size ? (message->size - 1) : 0;
|
||||
|
||||
if (message->size == 0)
|
||||
@ -188,9 +188,9 @@ dp_aux_transaction(uint32 connectorIndex, dp_aux_msg* message)
|
||||
|
||||
|
||||
void
|
||||
dpcd_reg_write(uint32 connectorIndex, uint16 address, uint8 value)
|
||||
dpcd_reg_write(uint32 connectorIndex, uint32 address, uint8 value)
|
||||
{
|
||||
//TRACE("%s: connector(%" B_PRId32 "): 0x%" B_PRIx16 " -> 0x%" B_PRIx8 "\n",
|
||||
//TRACE("%s: connector(%" B_PRId32 "): 0x%" B_PRIx32 " -> 0x%" B_PRIx8 "\n",
|
||||
// __func__, connectorIndex, address, value);
|
||||
dp_aux_msg message;
|
||||
memset(&message, 0, sizeof(message));
|
||||
@ -209,9 +209,9 @@ dpcd_reg_write(uint32 connectorIndex, uint16 address, uint8 value)
|
||||
|
||||
|
||||
uint8
|
||||
dpcd_reg_read(uint32 connectorIndex, uint16 address)
|
||||
dpcd_reg_read(uint32 connectorIndex, uint32 address)
|
||||
{
|
||||
//TRACE("%s: connector(%" B_PRId32 "): read 0x%" B_PRIx16 ".\n",
|
||||
//TRACE("%s: connector(%" B_PRId32 "): read 0x%" B_PRIx32 ".\n",
|
||||
// __func__, connectorIndex, address);
|
||||
uint8 response[3];
|
||||
|
||||
@ -234,7 +234,7 @@ dpcd_reg_read(uint32 connectorIndex, uint16 address)
|
||||
|
||||
|
||||
status_t
|
||||
dp_aux_get_i2c_byte(uint32 connectorIndex, uint16 address, uint8* data,
|
||||
dp_aux_get_i2c_byte(uint32 connectorIndex, uint32 address, uint8* data,
|
||||
bool start, bool stop)
|
||||
{
|
||||
uint8 reply[3];
|
||||
@ -284,7 +284,7 @@ dp_aux_get_i2c_byte(uint32 connectorIndex, uint16 address, uint8* data,
|
||||
|
||||
|
||||
status_t
|
||||
dp_aux_set_i2c_byte(uint32 connectorIndex, uint16 address, uint8* data,
|
||||
dp_aux_set_i2c_byte(uint32 connectorIndex, uint32 address, uint8* data,
|
||||
bool start, bool stop)
|
||||
{
|
||||
dp_aux_msg message;
|
||||
|
@ -23,15 +23,15 @@
|
||||
#define DP_TPS3_SUPPORTED (1 << 6) // Stored within MAX_LANE_COUNT
|
||||
|
||||
|
||||
uint8 dpcd_reg_read(uint32 connectorIndex, uint16 address);
|
||||
void dpcd_reg_write(uint32 connectorIndex, uint16 address, uint8 value);
|
||||
uint8 dpcd_reg_read(uint32 connectorIndex, uint32 address);
|
||||
void dpcd_reg_write(uint32 connectorIndex, uint32 address, uint8 value);
|
||||
|
||||
// Communication over DisplayPort AUX channel
|
||||
status_t dp_aux_transaction(uint32 connectorIndex, dp_aux_msg* message);
|
||||
|
||||
status_t dp_aux_set_i2c_byte(uint32 connectorIndex, uint16 address,
|
||||
status_t dp_aux_set_i2c_byte(uint32 connectorIndex, uint32 address,
|
||||
uint8* data, bool start, bool stop);
|
||||
status_t dp_aux_get_i2c_byte(uint32 connectorIndex, uint16 address,
|
||||
status_t dp_aux_get_i2c_byte(uint32 connectorIndex, uint32 address,
|
||||
uint8* data, bool start, bool stop);
|
||||
|
||||
uint32 dp_get_link_rate(uint32 connectorIndex, display_mode* mode);
|
||||
|
Loading…
Reference in New Issue
Block a user