Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174632
b: refs/heads/master
c: 1a66c95
h: refs/heads/master
v: v3
  • Loading branch information
Alex Deucher authored and Dave Airlie committed Dec 8, 2009
1 parent 22007ac commit a54d8e6
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 151 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 746c1aa4d100f7441423050f34be79f401fbf7d4
refs/heads/master: 1a66c95a64c9ae0bc8382254f544b24b23f498ec
24 changes: 12 additions & 12 deletions trunk/drivers/gpu/drm/radeon/atombios_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
#define DP_LINK_STATUS_SIZE 6

bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, u8 *req_bytes,
int num_bytes, u8 *read_byte,
int num_bytes, u8 *read_byte,
u8 read_buf_len, u8 delay)
{
struct drm_device *dev = chan->dev;
struct radeon_device *rdev = dev->dev_private;
PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION args;
int index = GetIndexIntoMasterTable(COMMAND, ProcessAuxChannelTransaction);
unsigned char *base;

memset(&args, 0, sizeof(args));

base = (unsigned char *)rdev->mode_info.atom_context->scratch;

memcpy(base, req_bytes, num_bytes);
Expand All @@ -53,7 +53,7 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, u8 *req_bytes,
args.lpDataOut = 16;
args.ucDataOutLen = 0;
args.ucChannelID = chan->i2c_id;
args.ucDelay = delay;
args.ucDelay = delay / 10;

atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);

Expand Down Expand Up @@ -158,24 +158,24 @@ bool radeon_dp_aux_native_read(struct radeon_connector *radeon_connector, uint16
return ret;
}

void radeon_dp_getdpcp(struct radeon_connector *radeon_connector)
void radeon_dp_getdpcd(struct radeon_connector *radeon_connector)
{
struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv;
u8 msg[25];
int ret;

ret = radeon_dp_aux_native_read(radeon_connector, DP_DPCP_REV, 0, 8, msg);
ret = radeon_dp_aux_native_read(radeon_connector, DP_DPCD_REV, 0, 8, msg);
if (ret) {
memcpy(radeon_dig_connector->dpcp, msg, 8);
{
memcpy(radeon_dig_connector->dpcd, msg, 8);
{
int i;
printk("DPCP: ");
printk("DPCD: ");
for (i = 0; i < 8; i++)
printk("%02x ", msg[i]);
printk("\n");
}
}
radeon_dig_connector->dpcp[0] = 0;
radeon_dig_connector->dpcd[0] = 0;
return;
}

Expand All @@ -199,8 +199,8 @@ static bool atom_dp_get_link_status(struct radeon_connector *radeon_connector,
static void dp_set_power(struct radeon_connector *radeon_connector, u8 power_state)
{
struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv;
if (radeon_dig_connector->dpcp[0] >= 0x11) {
radeon_dp_aux_native_write(radeon_connector, 0x600, 1,
if (radeon_dig_connector->dpcd[0] >= 0x11) {
radeon_dp_aux_native_write(radeon_connector, DP_SET_POWER, 1,
&power_state);
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/radeon/radeon_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ static enum drm_connector_status radeon_dp_detect(struct drm_connector *connecto

sink_type = radeon_dp_getsinktype(radeon_connector);
if (sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {
radeon_dp_getdpcp(radeon_connector);
radeon_dp_getdpcd(radeon_connector);
ret = connector_status_connected;
}
return ret;
Expand Down
Loading

0 comments on commit a54d8e6

Please sign in to comment.