drm/dp_mst: Fix the DDC I2C device registration of an MST port
authorImre Deak <imre.deak@intel.com>
Sun, 7 Jun 2020 21:25:21 +0000 (00:25 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 11 Jun 2020 12:36:50 +0000 (15:36 +0300)
commitd8bd15b37d328a935a4fc695fed8b19157503950
treedc6df033df794817325a37282b7619087625d6e4
parent7d11507605a75fcb2159b93d1fe8213b363a2c20
drm/dp_mst: Fix the DDC I2C device registration of an MST port

During the initial MST probing an MST port's I2C device will be
registered using the kdev of the DRM device as a parent. Later after MST
Connection Status Notifications this I2C device will be re-registered
with the kdev of the port's connector. This will also move
inconsistently the I2C device's sysfs entry from the DRM device's sysfs
dir to the connector's dir.

Fix the above by keeping the DRM kdev as the parent of the I2C device.

Ideally the connector's kdev would be used as a parent, similarly to
non-MST connectors, however that needs some more refactoring to ensure
the connector's kdev is already available early enough. So keep the
existing (initial) behavior for now.

Cc: <stable@vger.kernel.org>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200607212522.16935-2-imre.deak@intel.com
drivers/gpu/drm/drm_dp_mst_topology.c