drm/amd/display: check phy dpalt lane count config
authorLewis Huang <Lewis.Huang@amd.com>
Thu, 5 Sep 2019 07:33:58 +0000 (15:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Oct 2019 00:32:03 +0000 (19:32 -0500)
commitf537d474df15393ad25721f5203ce16ed3596d66
tree3ea2943d295e52b149889bdc9ff0b5c619fbc27c
parentd832fc3b182045185e3dd92e20ac31c84be68da7
drm/amd/display: check phy dpalt lane count config

[Why]
Type-c PHY config is not align with dpcd lane count.
When those values didn't match, it cause driver do
link training with 4 lane but phy only can output 2 lane.
The link trainig always fail.

[How]
1. Modify get_max_link_cap function. According DPALT_DP4
to update max lane count.
2. Add dp_mst_verify_link_cap to handle MST case because
we didn't call dp_mst_verify_link_cap for MST case.

Signed-off-by: Lewis Huang <Lewis.Huang@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.h
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h
drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h