thunderbolt: Do not create DisplayPort tunnels on adapters of the same router
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 26 Mar 2024 08:58:15 +0000 (10:58 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 2 Apr 2024 05:51:12 +0000 (08:51 +0300)
commitc032cdd48b29549e8283c2fea99e7d91ddefebf7
tree4956b51ff77123c0de7254f38518abcce6939c59
parent39cd87c4eb2b893354f3b850f916353f2658ae6f
thunderbolt: Do not create DisplayPort tunnels on adapters of the same router

Probably due to a firmware bug Dell TB16 dock announces that one of its
DisplayPort adapters is actually DP IN. Now this is possible and used
with some external GPUs but not likely in this case as we are dealing
with a dock. Anyways the problem is that the driver tries to create a
DisplayPort tunnel between adapters of the same router which then shows
to user that there is no picture on the display (because there are no
available DP OUT adapters on the dock anymore).

Fix this by not creating DisplayPort tunnels between adapters that are
on the same router.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10265
Fixes: 274baf695b08 ("thunderbolt: Add DP IN added last in the head of the list of DP resources")
Cc: Gil Fine <gil.fine@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/tb.c