android_kernel_samsung_sm8650/drivers/thunderbolt
Sanjay R Mehta f016326d31 thunderbolt: Fix Thunderbolt 3 display flickering issue on 2nd hot plug onwards
commit 583893a66d731f5da010a3fa38a0460e05f0149b upstream.

Previously, on unplug events, the TMU mode was disabled first
followed by the Time Synchronization Handshake, irrespective of
whether the tb_switch_tmu_rate_write() API was successful or not.

However, this caused a problem with Thunderbolt 3 (TBT3)
devices, as the TSPacketInterval bits were always enabled by default,
leading the host router to assume that the device router's TMU was
already enabled and preventing it from initiating the Time
Synchronization Handshake. As a result, TBT3 monitors experienced
display flickering from the second hot plug onwards.

To address this issue, we have modified the code to only disable the
Time Synchronization Handshake during TMU disable if the
tb_switch_tmu_rate_write() function is successful. This ensures that
the TBT3 devices function correctly and eliminates the display
flickering issue.

Co-developed-by: Sanath S <Sanath.S@amd.com>
Signed-off-by: Sanath S <Sanath.S@amd.com>
Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[ USB4v2 introduced support for uni-directional TMU mode as part of
  d49b4f043d63 ("thunderbolt: Add support for enhanced uni-directional TMU mode")
  This is not a stable candidate commit, so adjust the code for backport. ]
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:11:11 +02:00
..
acpi.c ACPI: Drop parent field from struct acpi_device 2022-08-24 20:55:24 +02:00
cap.c
ctl.c thunderbolt: Use the actual buffer in tb_async_error() 2022-08-18 11:55:46 +03:00
ctl.h thunderbolt: Fix typo in comment 2022-06-17 18:19:15 +03:00
debugfs.c thunderbolt: Fix memory leak in margining 2023-03-30 12:49:14 +02:00
dma_port.c thunderbolt: Use generic tb_nvm_[read|write]_data() for Thunderbolt 2/3 devices 2021-05-31 14:37:54 +03:00
dma_port.h
dma_test.c thunderbolt: dma_test: Use correct value for absent rings when creating paths 2023-06-21 16:00:56 +02:00
domain.c thunderbolt: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-09-24 09:22:01 +03:00
eeprom.c thunderbolt: Rename EEPROM handling bits to match USB4 spec 2022-03-04 17:10:36 +03:00
icm.c thunderbolt: Changes for v6.1 merge window 2022-09-30 13:44:59 +02:00
Kconfig thunderbolt: Changes for v6.1 merge window 2022-09-30 13:44:59 +02:00
lc.c thunderbolt: Add internal xHCI connect flows for Thunderbolt 3 devices 2022-02-02 13:56:51 +03:00
Makefile thunderbolt: build kunit tests without structleak plugin 2021-10-06 17:53:49 -06:00
nhi_ops.c
nhi_regs.h thunderbolt: Clear registers properly when auto clear isn't in use 2023-05-24 17:32:51 +01:00
nhi.c thunderbolt: Add Intel Barlow Ridge PCI ID 2023-08-23 17:52:24 +02:00
nhi.h thunderbolt: Limit Intel Barlow Ridge USB3 bandwidth 2023-08-23 17:52:24 +02:00
nvm.c thunderbolt: Add support for ASMedia NVM image format 2022-09-07 09:06:51 +03:00
path.c thunderbolt: Dump path config space entries during discovery 2022-04-19 10:26:13 +03:00
property.c thunderbolt: Add tb_property_copy_dir() 2021-03-18 18:25:31 +03:00
quirks.c thunderbolt: Limit Intel Barlow Ridge USB3 bandwidth 2023-08-23 17:52:24 +02:00
retimer.c thunderbolt: Read retimer NVM authentication status prior tb_retimer_set_inbound_sbtx() 2023-08-23 17:52:24 +02:00
sb_regs.h thunderbolt: Add missing UNSET_INBOUND_SBTX for retimer access 2023-03-30 12:49:15 +02:00
switch.c thunderbolt: Call tb_check_quirks() after initializing adapters 2023-03-30 12:49:14 +02:00
tb_msgs.h thunderbolt: Add support for XDomain lane bonding 2022-05-05 09:25:23 +03:00
tb_regs.h thunderbolt: Explicitly enable lane adapter hotplug events at startup 2022-09-26 20:18:25 +03:00
tb.c thunderbolt: Do not touch CL state configuration during discovery 2023-06-21 16:00:56 +02:00
tb.h thunderbolt: Use correct type in tb_port_is_clx_enabled() prototype 2023-05-11 23:03:41 +09:00
test.c thunderbolt: test: Use kunit_test_suite() macro 2022-07-11 17:13:21 -06:00
tmu.c thunderbolt: Fix Thunderbolt 3 display flickering issue on 2nd hot plug onwards 2023-08-30 16:11:11 +02:00
tunnel.c thunderbolt: Use correct function to calculate maximum USB3 link rate 2023-01-24 07:24:37 +01:00
tunnel.h thunderbolt: Use different lane for second DisplayPort tunnel 2022-04-19 10:26:18 +03:00
usb4_port.c thunderbolt: Show link type for XDomain connections too 2022-08-31 14:05:12 +01:00
usb4.c thunderbolt: Limit USB3 bandwidth of certain Intel USB4 host routers 2023-04-06 12:10:33 +02:00
xdomain.c thunderbolt: Disable XDomain lane 1 only in software connection manager 2023-01-24 07:24:37 +01:00