FAILED: patch "[PATCH] drm/amdgpu/dce: Don't turn off DP sink when disconnected" failed to apply to 4.16-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.16-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
daf8809626c0ee7a152f9c34058fc3b43385dd51Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <[email protected]>
Date: Fri, 9 Mar 2018 18:26:18 +0100
Subject: [PATCH] drm/amdgpu/dce: Don't turn off DP sink when disconnected
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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/amd/amdgpu/amdgpu_connectors.c +12 -19
@@ -69,25 +69,18 @@ void amdgpu_connector_hotplug(struct drm_connector *connector)/* 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 (!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. -*/ - connector->dpms =DRM_MODE_DPMS_OFF ; -drm_helper_connector_dpms (connector,DRM_MODE_DPMS_ON ); - } - connector->dpms = saved_dpms; +if (dig_connector->dp_sink_type ==CONNECTOR_OBJECT_ID_DISPLAYPORT && +amdgpu_display_hpd_sense (adev, amdgpu_connector->hpd.hpd) && +amdgpu_atombios_dp_needs_link_train (amdgpu_connector)) { +/* Don't start link training before we have the DPCD */ +if (amdgpu_atombios_dp_get_dpcd (amdgpu_connector)) +return ; + +/* 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 ); } } }
Hi Greg,
Quoted 2 lines · On 2018-04-22 10:13 AM, [email protected] wrote:
The patch below does not apply to the 4.16-stable tree.
This commit, and the corresponding commit a3f73c8cf43858455a979d0f8354815e1443c496 ("drm/radeon: Don't turn off DP sink when disconnected"), do not apply to the 4.16 stable tree because they were already merged as fixes in the 4.16 development cycle. Please backport them to older stable trees.
Thanks,
Quoted 65 lines
------------------ original commit in Linus's tree ------------------
From
daf8809626c0ee7a152f9c34058fc3b43385dd51Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <[email protected]>
Date: Fri, 9 Mar 2018 18:26:18 +0100
Subject: [PATCH] drm/amdgpu/dce: Don't turn off DP sink when disconnected
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bitTurning 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
Reviewed-by Alex Deucher <[email protected]>Signed-off-by Michel Dänzer <[email protected]>Signed-off-by Alex Deucher <[email protected]>drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +12
-19@@ -69,25 +69,18 @@ void amdgpu_connector_hotplug(struct drm_connector *connector)/* 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 (!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. -*/ - connector->dpms =DRM_MODE_DPMS_OFF ; -drm_helper_connector_dpms (connector,DRM_MODE_DPMS_ON ); - } - connector->dpms = saved_dpms; +if (dig_connector->dp_sink_type ==CONNECTOR_OBJECT_ID_DISPLAYPORT && +amdgpu_display_hpd_sense (adev, amdgpu_connector->hpd.hpd) && +amdgpu_atombios_dp_needs_link_train (amdgpu_connector)) { +/* Don't start link training before we have the DPCD */ +if (amdgpu_atombios_dp_get_dpcd (amdgpu_connector)) +return ; + +/* 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 ); } } }
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer
Greg KH
maintainerQuoted 6 lines · Michel D�nzer
Hi Greg,
Quoted 1 line · On 2018-04-22 10:13 AM, [email protected] wrote:
Quoted 7 lines
Quoted 1 line
The patch below does not apply to the 4.16-stable tree.
This commit, and the corresponding commit
a3f73c8cf43858455a979d0f8354815e1443c496("drm/radeon: Don't turn off DP sink when disconnected"), do not apply to the 4.16 stable tree because they were already merged as fixes in the 4.16 development cycle. Please backport them to older stable trees.
To what older stable trees specifically? I tried to apply them to other ones, but they all seem to fail :(
thanks,
greg k-h
Quoted 9 lines · Greg KH
Quoted 8 lines · Michel Dänzer
Hi Greg,
Quoted 2 lines · On 2018-04-22 10:13 AM, [email protected] wrote:
The patch below does not apply to the 4.16-stable tree.
Quoted 8 lines
Quoted 5 lines
This commit, and the corresponding commit
a3f73c8cf43858455a979d0f8354815e1443c496("drm/radeon: Don't turn off DP sink when disconnected"), do not apply to the 4.16 stable tree because they were already merged as fixes in the 4.16 development cycle. Please backport them to older stable trees.To what older stable trees specifically? I tried to apply them to other ones, but they all seem to fail :(
Looks like the fixes have already been backported from 4.16-rc to all applicable stable trees, so there's nothing to do or worry about. :)
Sorry for the noise, thanks
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer