History

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

Linus Torvalds committed 15 years ago

Commit 84c86112 parents 746fb63 cb7cf413 files · +21 −21Browse files

Unified · Split

3 files
  1. drivers/gpu/drm/radeon/atombios_dp.c +9 −3
  2. drivers/gpu/drm/radeon/radeon_connectors.c +6 −15
  3. drivers/gpu/drm/radeon/radeon_encoders.c +6 −3
drivers/gpu/drm/radeon/atombios_dp.c+9−3
@@ -129,7 +129,9 @@ static int radeon_dp_aux_native_write(struct radeon_connector *radeon_connector, · 128 unmodified lines
129129 for (retry = 0; retry < 4; retry++) {
130130 ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
131131 msg, msg_bytes, NULL, 0, delay, &ack);
132− if (ret < 0)
132+ if (ret == -EBUSY)
133+ continue;
134+ else if (ret < 0)
133135 return ret;
134136 if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
135137 return send_bytes;
@@ -160,7 +162,9 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector, · 24 unmodified lines
160162 for (retry = 0; retry < 4; retry++) {
161163 ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus,
162164 msg, msg_bytes, recv, recv_bytes, delay, &ack);
163− if (ret < 0)
165+ if (ret == -EBUSY)
166+ continue;
167+ else if (ret < 0)
164168 return ret;
165169 if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
166170 return ret;
@@ -236,7 +240,9 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, · 69 unmodified lines
236240 for (retry = 0; retry < 4; retry++) {
237241 ret = radeon_process_aux_ch(auxch,
238242 msg, msg_bytes, reply, reply_bytes, 0, &ack);
239− if (ret < 0) {
243+ if (ret == -EBUSY)
244+ continue;
245+ else if (ret < 0) {
240246 DRM_DEBUG_KMS("aux_ch failed %d\n", ret);
241247 return ret;
242248 }
drivers/gpu/drm/radeon/radeon_connectors.c+6−15
@@ -1303,23 +1303,14 @@ radeon_dp_detect(struct drm_connector *connector, bool force) · 1302 unmodified lines
13031303 /* get the DPCD from the bridge */
13041304 radeon_dp_getdpcd(radeon_connector);
13051305
1306− if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
1307− ret = connector_status_connected;
1308− else {
1309− /* need to setup ddc on the bridge */
1310− if (encoder)
1311− radeon_atom_ext_encoder_setup_ddc(encoder);
1306+ if (encoder) {
1307+ /* setup ddc on the bridge */
1308+ radeon_atom_ext_encoder_setup_ddc(encoder);
13121309 if (radeon_ddc_probe(radeon_connector,
1313− radeon_connector->requires_extended_probe))
1310+ radeon_connector->requires_extended_probe)) /* try DDC */
13141311 ret = connector_status_connected;
1315− }
1316−
1317− if ((ret == connector_status_disconnected) &&
1318− radeon_connector->dac_load_detect) {
1319− struct drm_encoder *encoder = radeon_best_single_encoder(connector);
1320− struct drm_encoder_helper_funcs *encoder_funcs;
1321− if (encoder) {
1322− encoder_funcs = encoder->helper_private;
1312+ else if (radeon_connector->dac_load_detect) { /* try load detection */
1313+ struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
13231314 ret = encoder_funcs->detect(encoder, connector);
13241315 }
13251316 }
drivers/gpu/drm/radeon/radeon_encoders.c+6−3
@@ -1755,9 +1755,12 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder) · 1754 unmodified lines
17551755 /* DCE4/5 */
17561756 if (ASIC_IS_DCE4(rdev)) {
17571757 dig = radeon_encoder->enc_priv;
1758− if (ASIC_IS_DCE41(rdev))
1759− return radeon_crtc->crtc_id;
1760− else {
1758+ if (ASIC_IS_DCE41(rdev)) {
1759+ if (dig->linkb)
1760+ return 1;
1761+ else
1762+ return 0;
1763+ } else {
17611764 switch (radeon_encoder->encoder_id) {
17621765 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
17631766 if (dig->linkb)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t