drm/amdgpu: fix dp link rate selection (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Dec 2015 14:57:49 +0000 (09:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:44 +0000 (08:27 +0200)
commit8844e74f8e0f1758ad9931b480ec88dd37c8528c
treede817e9fc4fc238a5e569d1a4d775456d149051a
parent07235140a4c3ed8e0d8fcb58fc51d1cbb5406ff4
drm/amdgpu: fix dp link rate selection (v2)

[ Upstream commit 41869c1c7fe583dec932eb3d87de2e010b30a737 ]

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/amd/amdgpu/atombios_dp.c