提交 84c86116 编写于 作者: L Linus Torvalds

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/kms: use hardcoded dig encoder to transmitter mapping for DCE4.1
  drm/radeon/kms: fix dp_detect handling for DP bridge chips
  drm/radeon/kms: retry aux transactions if there are status flags
...@@ -129,7 +129,9 @@ static int radeon_dp_aux_native_write(struct radeon_connector *radeon_connector, ...@@ -129,7 +129,9 @@ static int radeon_dp_aux_native_write(struct radeon_connector *radeon_connector,
for (retry = 0; retry < 4; retry++) { for (retry = 0; retry < 4; retry++) {
ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
msg, msg_bytes, NULL, 0, delay, &ack); msg, msg_bytes, NULL, 0, delay, &ack);
if (ret < 0) if (ret == -EBUSY)
continue;
else if (ret < 0)
return ret; return ret;
if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
return send_bytes; return send_bytes;
...@@ -160,7 +162,9 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector, ...@@ -160,7 +162,9 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector,
for (retry = 0; retry < 4; retry++) { for (retry = 0; retry < 4; retry++) {
ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
msg, msg_bytes, recv, recv_bytes, delay, &ack); msg, msg_bytes, recv, recv_bytes, delay, &ack);
if (ret < 0) if (ret == -EBUSY)
continue;
else if (ret < 0)
return ret; return ret;
if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
return ret; return ret;
...@@ -236,7 +240,9 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, ...@@ -236,7 +240,9 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
for (retry = 0; retry < 4; retry++) { for (retry = 0; retry < 4; retry++) {
ret = radeon_process_aux_ch(auxch, ret = radeon_process_aux_ch(auxch,
msg, msg_bytes, reply, reply_bytes, 0, &ack); msg, msg_bytes, reply, reply_bytes, 0, &ack);
if (ret < 0) { if (ret == -EBUSY)
continue;
else if (ret < 0) {
DRM_DEBUG_KMS("aux_ch failed %d\n", ret); DRM_DEBUG_KMS("aux_ch failed %d\n", ret);
return ret; return ret;
} }
......
...@@ -1303,23 +1303,14 @@ radeon_dp_detect(struct drm_connector *connector, bool force) ...@@ -1303,23 +1303,14 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
/* get the DPCD from the bridge */ /* get the DPCD from the bridge */
radeon_dp_getdpcd(radeon_connector); radeon_dp_getdpcd(radeon_connector);
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) if (encoder) {
ret = connector_status_connected; /* setup ddc on the bridge */
else { radeon_atom_ext_encoder_setup_ddc(encoder);
/* need to setup ddc on the bridge */
if (encoder)
radeon_atom_ext_encoder_setup_ddc(encoder);
if (radeon_ddc_probe(radeon_connector, if (radeon_ddc_probe(radeon_connector,
radeon_connector->requires_extended_probe)) radeon_connector->requires_extended_probe)) /* try DDC */
ret = connector_status_connected; ret = connector_status_connected;
} else if (radeon_connector->dac_load_detect) { /* try load detection */
struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
if ((ret == connector_status_disconnected) &&
radeon_connector->dac_load_detect) {
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
struct drm_encoder_helper_funcs *encoder_funcs;
if (encoder) {
encoder_funcs = encoder->helper_private;
ret = encoder_funcs->detect(encoder, connector); ret = encoder_funcs->detect(encoder, connector);
} }
} }
......
...@@ -1755,9 +1755,12 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder) ...@@ -1755,9 +1755,12 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder)
/* DCE4/5 */ /* DCE4/5 */
if (ASIC_IS_DCE4(rdev)) { if (ASIC_IS_DCE4(rdev)) {
dig = radeon_encoder->enc_priv; dig = radeon_encoder->enc_priv;
if (ASIC_IS_DCE41(rdev)) if (ASIC_IS_DCE41(rdev)) {
return radeon_crtc->crtc_id; if (dig->linkb)
else { return 1;
else
return 0;
} else {
switch (radeon_encoder->encoder_id) { switch (radeon_encoder->encoder_id) {
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
if (dig->linkb) if (dig->linkb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册