drm/amd/display: Drop reusing drm connector for MST
authorJerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Tue, 30 Oct 2018 18:37:16 +0000 (14:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Nov 2018 22:05:55 +0000 (17:05 -0500)
commit5d8e06a3b7b2a1edecd47ddb3670c63fedf55c72
tree31ae7e09a296b7ce9d76195a0f46029581815dc1
parent1b32d6e040272e7a722910f6ba10cbc6099dd238
drm/amd/display: Drop reusing drm connector for MST

[why]
It is not safe to keep existing connector while entire topology
has been removed. Could lead potential impact to uapi.
Entirely unregister all the connectors on the topology,
and use a new set of connectors when the topology is plugged back
on.

[How]
Remove the drm connector entirely each time when the
corresponding MST topology is gone.
When hotunplug a connector (e.g., DP2)
1. Remove connector from userspace.
2. Drop it's reference.
When hotplug back on:
1. Detect new topology, and create new connectors.
2. Notify userspace with sysfs hotplug event.
3. Reprobe new connectors, and reassign CRTC from old (e.g., DP2)
to new (e.g., DP3) connector.

Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c