mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-08 02:21:18 +00:00
drm/radeon/dp: use usleep_range rather than udelay
Based on common dp code proposed by Thierry Reding. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2138681bdd
commit
ab9f51c09f
@ -172,7 +172,7 @@ static int radeon_dp_aux_native_write(struct radeon_connector *radeon_connector,
|
|||||||
if ((ack & DP_AUX_NATIVE_REPLY_MASK) == DP_AUX_NATIVE_REPLY_ACK)
|
if ((ack & DP_AUX_NATIVE_REPLY_MASK) == DP_AUX_NATIVE_REPLY_ACK)
|
||||||
return send_bytes;
|
return send_bytes;
|
||||||
else if ((ack & DP_AUX_NATIVE_REPLY_MASK) == DP_AUX_NATIVE_REPLY_DEFER)
|
else if ((ack & DP_AUX_NATIVE_REPLY_MASK) == DP_AUX_NATIVE_REPLY_DEFER)
|
||||||
udelay(400);
|
usleep_range(400, 500);
|
||||||
else
|
else
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector,
|
|||||||
if ((ack & DP_AUX_NATIVE_REPLY_MASK) == DP_AUX_NATIVE_REPLY_ACK)
|
if ((ack & DP_AUX_NATIVE_REPLY_MASK) == DP_AUX_NATIVE_REPLY_ACK)
|
||||||
return ret;
|
return ret;
|
||||||
else if ((ack & DP_AUX_NATIVE_REPLY_MASK) == DP_AUX_NATIVE_REPLY_DEFER)
|
else if ((ack & DP_AUX_NATIVE_REPLY_MASK) == DP_AUX_NATIVE_REPLY_DEFER)
|
||||||
udelay(400);
|
usleep_range(400, 500);
|
||||||
else if (ret == 0)
|
else if (ret == 0)
|
||||||
return -EPROTO;
|
return -EPROTO;
|
||||||
else
|
else
|
||||||
@ -295,7 +295,7 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
|
|||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
case DP_AUX_NATIVE_REPLY_DEFER:
|
case DP_AUX_NATIVE_REPLY_DEFER:
|
||||||
DRM_DEBUG_KMS("aux_ch native defer\n");
|
DRM_DEBUG_KMS("aux_ch native defer\n");
|
||||||
udelay(400);
|
usleep_range(500, 600);
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
DRM_ERROR("aux_ch invalid native reply 0x%02x\n", ack);
|
DRM_ERROR("aux_ch invalid native reply 0x%02x\n", ack);
|
||||||
@ -312,7 +312,7 @@ int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
|
|||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
case DP_AUX_I2C_REPLY_DEFER:
|
case DP_AUX_I2C_REPLY_DEFER:
|
||||||
DRM_DEBUG_KMS("aux_i2c defer\n");
|
DRM_DEBUG_KMS("aux_i2c defer\n");
|
||||||
udelay(400);
|
usleep_range(400, 500);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DRM_ERROR("aux_i2c invalid reply 0x%02x\n", ack);
|
DRM_ERROR("aux_i2c invalid reply 0x%02x\n", ack);
|
||||||
|
Loading…
Reference in New Issue
Block a user