diff options
author | Sean Paul <seanpaul@chromium.org> | 2019-08-29 02:09:44 +0200 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2019-12-05 19:13:46 +0100 |
commit | f79489074c59a5fd6bc35b21ca9911237993a045 (patch) | |
tree | 026f3416918ecb969d863e989d25f268e4078e5e /include | |
parent | drm/mgag200: Debug-print unique revisions id on G200 SE (diff) | |
download | linux-f79489074c59a5fd6bc35b21ca9911237993a045.tar.xz linux-f79489074c59a5fd6bc35b21ca9911237993a045.zip |
drm/dp_mst: Clear all payload id tables downstream when initializing
It seems that on certain MST hubs, namely the CableMatters USB-C 2x DP
hub, using the DP_PAYLOAD_ALLOCATE_SET and DP_PAYLOAD_TABLE_UPDATE_STATUS
register ranges to clear any pre-existing payload allocations on the hub isn't
always enough to reset things if the source device has been reset unexpectedly.
Or at least, that's the current running theory. The precise behavior appears to
be that when the source device gets reset unexpectedly, the hub begins reporting
an available_pbn value of 0 for all of its ports. This is a bit inconsistent
with the our theory, since this seems to happen even if previously set PBN
allocations should have resulted in a non-zero available_pbn value. So, it's
possible that something else may be going on here.
Strangely though, sending a CLEAR_PAYLOAD_ID_TABLE broadcast request when
initializing the MST topology seems to bring things into working order and make
available_pbn work again. Since this is a pretty safe solution, let's go ahead
and implement it.
Changes since v1:
* Change indenting on drm_dp_send_clear_payload_id_table() prototype
* Remove some braces in drm_dp_send_clear_payload_id_table()
* Reorganize some variable declarations in drm_dp_send_clear_payload_id_table()
* Don't forget to handle DP_CLEAR_PAYLOAD_ID_TABLE in
drm_dp_sideband_parse_reply()
* Move drm_dp_send_clear_payload_id_table() call into
drm_dp_mst_link_probe_work(), since we can't send sideband messages
while under lock in drm_dp_mst_topology_mgr_set_mst()
* Change commit message
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190829000944.20722-1-lyude@redhat.com
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_dp_mst_helper.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 4a25e0577ae0..a448d701dc7e 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -490,15 +490,23 @@ struct drm_dp_mst_topology_mgr { struct drm_dp_sideband_msg_rx up_req_recv; /** - * @lock: protects mst state, primary, dpcd. + * @lock: protects @mst_state, @mst_primary, @dpcd, and + * @payload_id_table_cleared. */ struct mutex lock; /** - * @mst_state: If this manager is enabled for an MST capable port. False - * if no MST sink/branch devices is connected. + * @mst_state: If this manager is enabled for an MST capable port. + * False if no MST sink/branch devices is connected. */ - bool mst_state; + bool mst_state : 1; + + /** + * @payload_id_table_cleared: Whether or not we've cleared the payload + * ID table for @mst_primary. Protected by @lock. + */ + bool payload_id_table_cleared : 1; + /** * @mst_primary: Pointer to the primary/first branch device. */ |