diff options
author | Hersen Wu <hersenxs.wu@amd.com> | 2018-07-16 11:21:12 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-07-17 16:13:09 -0400 |
commit | 263318eea710a6dd9770f9b4f570889b5dfd0d39 (patch) | |
tree | a5609eb0264be1c3c9e62919401f852ab2e21543 /drivers | |
parent | 96a5d8d4915f3e241ebb48d5decdd110ab9c7dcf (diff) |
drm/amd/display: Fix DP HBR2 Eye Diagram Pattern on Carrizo
[why] dp hbr2 eye diagram pattern for raven asic is not stabled.
workaround is to use tp4 pattern. But this should not be
applied to asic before raven.
[how] add new bool varilable in asic caps. for raven asic,
use the workaround. for carrizo, vega, do not use workaround.
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 7857cb42b3e6..bdd121485cbc 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | |||
@@ -1767,12 +1767,10 @@ static void dp_test_send_link_training(struct dc_link *link) | |||
1767 | dp_retrain_link_dp_test(link, &link_settings, false); | 1767 | dp_retrain_link_dp_test(link, &link_settings, false); |
1768 | } | 1768 | } |
1769 | 1769 | ||
1770 | /* TODO hbr2 compliance eye output is unstable | 1770 | /* TODO Raven hbr2 compliance eye output is unstable |
1771 | * (toggling on and off) with debugger break | 1771 | * (toggling on and off) with debugger break |
1772 | * This caueses intermittent PHY automation failure | 1772 | * This caueses intermittent PHY automation failure |
1773 | * Need to look into the root cause */ | 1773 | * Need to look into the root cause */ |
1774 | static uint8_t force_tps4_for_cp2520 = 1; | ||
1775 | |||
1776 | static void dp_test_send_phy_test_pattern(struct dc_link *link) | 1774 | static void dp_test_send_phy_test_pattern(struct dc_link *link) |
1777 | { | 1775 | { |
1778 | union phy_test_pattern dpcd_test_pattern; | 1776 | union phy_test_pattern dpcd_test_pattern; |
@@ -1832,13 +1830,13 @@ static void dp_test_send_phy_test_pattern(struct dc_link *link) | |||
1832 | break; | 1830 | break; |
1833 | case PHY_TEST_PATTERN_CP2520_1: | 1831 | case PHY_TEST_PATTERN_CP2520_1: |
1834 | /* CP2520 pattern is unstable, temporarily use TPS4 instead */ | 1832 | /* CP2520 pattern is unstable, temporarily use TPS4 instead */ |
1835 | test_pattern = (force_tps4_for_cp2520 == 1) ? | 1833 | test_pattern = (link->dc->caps.force_dp_tps4_for_cp2520 == 1) ? |
1836 | DP_TEST_PATTERN_TRAINING_PATTERN4 : | 1834 | DP_TEST_PATTERN_TRAINING_PATTERN4 : |
1837 | DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE; | 1835 | DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE; |
1838 | break; | 1836 | break; |
1839 | case PHY_TEST_PATTERN_CP2520_2: | 1837 | case PHY_TEST_PATTERN_CP2520_2: |
1840 | /* CP2520 pattern is unstable, temporarily use TPS4 instead */ | 1838 | /* CP2520 pattern is unstable, temporarily use TPS4 instead */ |
1841 | test_pattern = (force_tps4_for_cp2520 == 1) ? | 1839 | test_pattern = (link->dc->caps.force_dp_tps4_for_cp2520 == 1) ? |
1842 | DP_TEST_PATTERN_TRAINING_PATTERN4 : | 1840 | DP_TEST_PATTERN_TRAINING_PATTERN4 : |
1843 | DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE; | 1841 | DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE; |
1844 | break; | 1842 | break; |
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 9cfde0ccf4e9..53c71296f3dd 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h | |||
@@ -76,6 +76,7 @@ struct dc_caps { | |||
76 | bool is_apu; | 76 | bool is_apu; |
77 | bool dual_link_dvi; | 77 | bool dual_link_dvi; |
78 | bool post_blend_color_processing; | 78 | bool post_blend_color_processing; |
79 | bool force_dp_tps4_for_cp2520; | ||
79 | }; | 80 | }; |
80 | 81 | ||
81 | struct dc_dcc_surface_param { | 82 | struct dc_dcc_surface_param { |
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c index df5cb2d1d164..34dac84066a0 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | |||
@@ -1027,6 +1027,8 @@ static bool construct( | |||
1027 | dc->caps.max_slave_planes = 1; | 1027 | dc->caps.max_slave_planes = 1; |
1028 | dc->caps.is_apu = true; | 1028 | dc->caps.is_apu = true; |
1029 | dc->caps.post_blend_color_processing = false; | 1029 | dc->caps.post_blend_color_processing = false; |
1030 | /* Raven DP PHY HBR2 eye diagram pattern is not stable. Use TP4 */ | ||
1031 | dc->caps.force_dp_tps4_for_cp2520 = true; | ||
1030 | 1032 | ||
1031 | if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV) | 1033 | if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV) |
1032 | dc->debug = debug_defaults_drv; | 1034 | dc->debug = debug_defaults_drv; |