drm/radeon: fix dp link rate selection (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Dec 2015 15:23:34 +0000 (10:23 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:44 +0000 (08:27 +0200)
commit724457fa1c0ca2992bec5a3db85ac3b130409cfa
tree662f580e02dd42d6699f0f29ae0340b3e6faa414
parent8844e74f8e0f1758ad9931b480ec88dd37c8528c
drm/radeon: fix dp link rate selection (v2)

[ Upstream commit 092c96a8ab9d1bd60ada2ed385cc364ce084180e ]

Need to properly handle the max link rate in the dpcd.
This prevents some cases where 5.4 Ghz is selected when
it shouldn't be.

v2: simplify logic, add array bounds check

Reviewed-by: Tom St Denis <tom.stdenis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/atombios_dp.c
drivers/gpu/drm/radeon/radeon_dp_mst.c
drivers/gpu/drm/radeon/radeon_mode.h