diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-05-18 18:15:07 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-06-03 21:03:41 -0400 |
commit | 67ed0092328dbc5f88759be9a32a95b151583e1b (patch) | |
tree | 743c085ed2d3793ed18c7f339c0e495bd13f7c5a /drivers/gpu/drm/amd | |
parent | 7af93b506956cd3efbea3c8e79a9420ac8819a7e (diff) |
drm/amdgpu: retry dcpd fetch
Retry the dpcd fetch several times. Some eDP panels
fail several times before the fetch is successful.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=73530
Ported from radeon.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c index d54c4b81f0f3..9ba0a7d5bc8e 100644 --- a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c +++ b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c | |||
@@ -358,19 +358,21 @@ int amdgpu_atombios_dp_get_dpcd(struct amdgpu_connector *amdgpu_connector) | |||
358 | { | 358 | { |
359 | struct amdgpu_connector_atom_dig *dig_connector = amdgpu_connector->con_priv; | 359 | struct amdgpu_connector_atom_dig *dig_connector = amdgpu_connector->con_priv; |
360 | u8 msg[DP_DPCD_SIZE]; | 360 | u8 msg[DP_DPCD_SIZE]; |
361 | int ret; | 361 | int ret, i; |
362 | 362 | ||
363 | ret = drm_dp_dpcd_read(&amdgpu_connector->ddc_bus->aux, DP_DPCD_REV, msg, | 363 | for (i = 0; i < 7; i++) { |
364 | DP_DPCD_SIZE); | 364 | ret = drm_dp_dpcd_read(&amdgpu_connector->ddc_bus->aux, DP_DPCD_REV, msg, |
365 | if (ret > 0) { | 365 | DP_DPCD_SIZE); |
366 | memcpy(dig_connector->dpcd, msg, DP_DPCD_SIZE); | 366 | if (ret == DP_DPCD_SIZE) { |
367 | memcpy(dig_connector->dpcd, msg, DP_DPCD_SIZE); | ||
367 | 368 | ||
368 | DRM_DEBUG_KMS("DPCD: %*ph\n", (int)sizeof(dig_connector->dpcd), | 369 | DRM_DEBUG_KMS("DPCD: %*ph\n", (int)sizeof(dig_connector->dpcd), |
369 | dig_connector->dpcd); | 370 | dig_connector->dpcd); |
370 | 371 | ||
371 | amdgpu_atombios_dp_probe_oui(amdgpu_connector); | 372 | amdgpu_atombios_dp_probe_oui(amdgpu_connector); |
372 | 373 | ||
373 | return 0; | 374 | return 0; |
375 | } | ||
374 | } | 376 | } |
375 | dig_connector->dpcd[0] = 0; | 377 | dig_connector->dpcd[0] = 0; |
376 | return -EINVAL; | 378 | return -EINVAL; |