Skip to content

Commit 0b39c53

Browse files
amd-anathalexdeucher
authored andcommitted
drm/amdgpu: return from atombios_dp_get_dpcd only when error
In amdgpu_connector_hotplug(), we need to start DP link training only after we have received DPCD. The function amdgpu_atombios_dp_get_dpcd() returns non-zero value only when an error condition is met, otherwise returns zero. So in case the function encounters an error, we need to skip rest of the code and return from amdgpu_connector_hotplug() immediately. Only when we are successfull in reading DPCD pin, we should carry on with turning-on the monitor. Signed-off-by: Arindam Nath <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 89913ea commit 0b39c53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void amdgpu_connector_hotplug(struct drm_connector *connector)
7777
} else if (amdgpu_atombios_dp_needs_link_train(amdgpu_connector)) {
7878
/* Don't try to start link training before we
7979
* have the dpcd */
80-
if (!amdgpu_atombios_dp_get_dpcd(amdgpu_connector))
80+
if (amdgpu_atombios_dp_get_dpcd(amdgpu_connector))
8181
return;
8282

8383
/* set it to OFF so that drm_helper_connector_dpms()

0 commit comments

Comments
 (0)