]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Fix passive dongle mistaken as active dongle in EDID emulation
authorSamson Tam <Samson.Tam@amd.com>
Thu, 13 Aug 2020 14:50:21 +0000 (10:50 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:11 +0000 (19:14 +0200)
[ Upstream commit efbde23a3b0164cef27fd394e7d548f46af5b51d ]

[Why]
dongle_type is set during dongle connection but for passive dongles,
dongle_type is not set. If user starts with an active dongle and
then switches to a passive dongle, it will still report as an active
dongle. Trying to emulate the wrong connecter type results in display
not lighting up.

[How]
Set dpcd_caps.dongle_type for passive dongles in detect_dp().

Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Reviewed-by: Joshua Aberback <Joshua.Aberback@amd.com>
Acked-by: Eryk Brol <eryk.brol@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.c

index bdddb46727b1f6e7542a588ac88ff1da65e0996f..885beb0bcc19974bbeebc388ab51a3cd5e146ca7 100644 (file)
@@ -767,6 +767,7 @@ static bool detect_dp(struct dc_link *link,
                sink_caps->signal = dp_passive_dongle_detection(link->ddc,
                                                                sink_caps,
                                                                audio_support);
+               link->dpcd_caps.dongle_type = sink_caps->dongle_type;
        }
 
        return true;