Patch "drm/radeon: Don't turn off DP sink when disconnected" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/radeon: Don't turn off DP sink when disconnected
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-radeon-don-t-turn-off-dp-sink-when-disconnected.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
2681bc79eeb640562c932007bfebbbdc55bf6a7dMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <[email protected]>
Date: Wed, 14 Mar 2018 18:14:04 +0100
Subject: drm/radeon: Don't turn off DP sink when disconnected
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Michel Dänzer <[email protected]>
commit 2681bc79eeb640562c932007bfebbbdc55bf6a7d upstream.
Turning off the sink in this case causes various issues, because userspace expects it to stay on until it turns it off explicitly.
Instead, turn the sink off and back on when a display is connected again. This dance seems necessary for link training to work correctly.
Bugzilla: https://bugs.freedesktop.org/105308
--- drivers/gpu/drm/radeon/radeon_connectors.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +11 -18
@@ -90,25 +90,18 @@ void radeon_connector_hotplug(struct drm/* don't do anything if sink is not display port, i.e., * passive dp->(dvi|hdmi) adaptor */ -if (dig_connector->dp_sink_type ==CONNECTOR_OBJECT_ID_DISPLAYPORT ) { -int saved_dpms = connector->dpms; -/* Only turn off the display if it's physically disconnected */ -if (!radeon_hpd_sense (rdev, radeon_connector->hpd.hpd)) { -drm_helper_connector_dpms (connector,DRM_MODE_DPMS_OFF ); - }else if (radeon_dp_needs_link_train (radeon_connector)) { -/* Don't try to start link training before we -* have the dpcd */ -if (!radeon_dp_getdpcd (radeon_connector)) -return ; +if (dig_connector->dp_sink_type ==CONNECTOR_OBJECT_ID_DISPLAYPORT && +radeon_hpd_sense (rdev, radeon_connector->hpd.hpd) && +radeon_dp_needs_link_train (radeon_connector)) { +/* Don't start link training before we have the DPCD */ +if (!radeon_dp_getdpcd (radeon_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. -*/ - connector->dpms =DRM_MODE_DPMS_OFF ; -drm_helper_connector_dpms (connector,DRM_MODE_DPMS_ON ); - } - connector->dpms = saved_dpms; +/* Turn the connector off and back on immediately, which +* will trigger link training +*/ +drm_helper_connector_dpms (connector,DRM_MODE_DPMS_OFF ); +drm_helper_connector_dpms (connector,DRM_MODE_DPMS_ON ); } } }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/drm-radeon-don-t-turn-off-dp-sink-when-disconnected.patch