From: Alex Deucher Date: Fri, 21 Aug 2015 22:07:38 +0000 (-0400) Subject: drm/amdgpu: Don't link train DisplayPort on HPD until we get the dpcd X-Git-Tag: v5.15~15142^2~14^2~31 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=a887adadb7b9ef9eb4ee48e4ad575aefcfd1db14;p=mirror_ubuntu-kernels.git drm/amdgpu: Don't link train DisplayPort on HPD until we get the dpcd This is a port of: DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd to amdgpu. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index 27df17a0e620..89c3dd62ba21 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -75,6 +75,11 @@ void amdgpu_connector_hotplug(struct drm_connector *connector) if (!amdgpu_display_hpd_sense(adev, amdgpu_connector->hpd.hpd)) { drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); } else if (amdgpu_atombios_dp_needs_link_train(amdgpu_connector)) { + /* Don't try to start link training before we + * have the dpcd */ + if (!amdgpu_atombios_dp_get_dpcd(amdgpu_connector)) + return; + /* set it to OFF so that drm_helper_connector_dpms() * won't return immediately since the current state * is ON at this point.