drm/amd/display: Prevent dpcd reads with passive dongles
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Wed, 22 Apr 2020 18:37:33 +0000 (14:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 15:46:35 +0000 (17:46 +0200)
commit4f48af814798891affd8653859eaab0230261c20
tree135159944de782056797a325c8349740c1825db2
parente0bb3075f91b0e47b0019ad64e86241e3abcd4f0
drm/amd/display: Prevent dpcd reads with passive dongles

[ Upstream commit e6142dd511425cb827b5db869f489eb81f5f994d ]

[why]
During hotplug, a DP port may be connected to the sink through
passive adapter which does not support DPCD reads. Issuing reads
without checking for this condition will result in errors

[how]
Ensure the link is in aux_mode before initiating operation that result
in a DPCD read.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c