drm/dp_mst: Reprobe path resources in CSN handler
authorLyude Paul <lyude@redhat.com>
Fri, 6 Mar 2020 23:46:21 +0000 (18:46 -0500)
committerLyude Paul <lyude@redhat.com>
Thu, 12 Mar 2020 23:07:24 +0000 (19:07 -0400)
commit87212b51bff02a6722d5e84f7842a6b0717eb7d4
tree02aacf7300bbaff4cd6d32ebc9bcaa1401b16f80
parentfcf4638075964268bf8a0e212407096c6aab6fd3
drm/dp_mst: Reprobe path resources in CSN handler

We used to punt off reprobing path resources to the link address probe
work, but now that we handle CSNs asynchronously from the driver's HPD
handling we can do whatever the heck we want from the CSN!

So, reprobe the path resources from drm_dp_mst_handle_conn_stat(). Also,
get rid of the path resource reprobing code in
drm_dp_check_and_send_link_address() since it's needlessly complicated
when we already reprobe path resources from
drm_dp_handle_link_address_port(). And finally, teach
drm_dp_send_enum_path_resources() to return 1 on PBN changes so we know
if we need to send another hotplug or not.

This fixes issues where we've indicated to userspace that a port has
just been connected, before we actually probed it's available PBN -
something that results in unexpected atomic check failures.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check")
Cc: Mikita Lipski <mikita.lipski@amd.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-4-lyude@redhat.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
drivers/gpu/drm/drm_dp_mst_topology.c