diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index ed173d3..6f3af55 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -494,6 +494,10 @@ void radeon_dp_set_link_config(struct drm_connector *connector, if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) || (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP)) { + if (dig_connector->dpcd[0] == 0) { + DRM_ERROR("corrupt dpcd, updating\n"); + radeon_dp_getdpcd(radeon_connector); + } dig_connector->dp_clock = radeon_dp_get_dp_link_clock(connector, dig_connector->dpcd, mode->clock); dig_connector->dp_lane_count = @@ -550,6 +554,11 @@ void radeon_dp_set_rx_power_state(struct drm_connector *connector, dig_connector = radeon_connector->con_priv; + if (dig_connector->dpcd[0] == 0) { + DRM_ERROR("corrupt dpcd, updating\n"); + radeon_dp_getdpcd(radeon_connector); + } + /* power up/down the sink */ if (dig_connector->dpcd[0] >= 0x11) { drm_dp_dpcd_writeb(&radeon_connector->ddc_bus->aux, @@ -832,6 +841,11 @@ void radeon_dp_link_train(struct drm_encoder *encoder, (dig_connector->dp_sink_type != CONNECTOR_OBJECT_ID_eDP)) return; + if (dig_connector->dpcd[0] == 0) { + DRM_ERROR("corrupt dpcd, updating\n"); + radeon_dp_getdpcd(radeon_connector); + } + /* DPEncoderService newer than 1.1 can't program properly the * training pattern. When facing such version use the * DIGXEncoderControl (X== 1 | 2)