drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat()
authorLyude Paul <lyude@redhat.com>
Wed, 16 Oct 2019 21:50:15 +0000 (17:50 -0400)
committerLyude Paul <lyude@redhat.com>
Thu, 24 Oct 2019 18:26:12 +0000 (14:26 -0400)
commitdad7d84f883571dddb686c426cfd2533f58e7c27
tree147793213a7ebdd82fd05f814796f8ac92ae743f
parent3f9b3f02dda501ea1889d773d547dcff12a3f7bb
drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat()

This probably hasn't caused any problems up until now since it's
probably nearly impossible to encounter this in the wild, however if we
were to receive a connection status notification from the MST hub after
resume while we're in the middle of reprobing the link addresses for a
topology then there's a much larger chance that a port could have
changed from being an output port to input port (or vice versa). If we
forget to update this bit of information, we'll potentially ignore a
valid PDT change on a downstream port because we think it's an input
port.

So, make sure we read the input_port field in connection status
notifications in drm_dp_mst_handle_conn_stat() to prevent this from
happening once we've implemented suspend/resume reprobing.

Cc: Juston Li <juston.li@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191022023641.8026-8-lyude@redhat.com
drivers/gpu/drm/drm_dp_mst_topology.c