drm/amd/display: Passive DP->HDMI dongle detection fix
authorMichael Strauss <michael.strauss@amd.com>
Thu, 3 Oct 2019 15:54:15 +0000 (11:54 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 18:21:15 +0000 (19:21 +0100)
commit99d5f18cebbf3f01f269368923e9b9c3ac134700
tree38e98507489b5fae86818b3594b7ed55572e61b8
parente5edbf9c45cec143526d9d1708d216228a197cd8
drm/amd/display: Passive DP->HDMI dongle detection fix

[ Upstream commit bc2fde42e2418808dbfc04de1a6da91d7d31cf1a ]

[WHY]
i2c_read is called to differentiate passive DP->HDMI and DP->DVI-D dongles
The call is expected to fail in DVI-D case but pass in HDMI case
Some HDMI dongles have a chance to fail as well, causing misdetection as DVI-D

[HOW]
Retry i2c_read to ensure failed result is valid

Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c