From: Ivan Lipski <[email protected]>

[Why & How]
'skip_frl_pretraining' was introduced and enabled along w/ HDMI 2.1
initial upstream, but is causing HDMI validation link training to be s
kipped on short hotplugs and compliance issues.

Remove this behaviour to force link training on all hotplugs for all
ASICs.

Reviewed-by: Relja (Reggie) Vojvodic <[email protected]>
Reviewed-by: Sun peng (Leo) Li <[email protected]>
Signed-off-by: Ivan Lipski <[email protected]>
Signed-off-by: George Zhang <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dc.h                             | 1 -
 drivers/gpu/drm/amd/display/dc/dc_types.h                       | 1 +
 drivers/gpu/drm/amd/display/dc/link/link_detection.c            | 2 +-
 drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c  | 1 -
 .../gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c    | 1 -
 .../gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c    | 1 -
 drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c  | 1 -
 .../gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c    | 1 -
 .../gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c    | 1 -
 drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c  | 1 -
 .../gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c    | 1 -
 drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c  | 1 -
 .../gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c    | 1 -
 drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c  | 1 -
 14 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dc.h 
b/drivers/gpu/drm/amd/display/dc/dc.h
index 2de0f9cf8264..b21fdea5fca3 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -591,7 +591,6 @@ struct dc_config {
        bool enable_mipi_converter_optimization;
        bool enable_frl;
        bool force_hdmi21_frl_enc_enable;
-       bool skip_frl_pretraining;
        bool use_default_clock_table;
        bool force_bios_enable_lttpr;
        uint8_t force_bios_fixed_vs;
diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h 
b/drivers/gpu/drm/amd/display/dc/dc_types.h
index db6a89d938b6..90dd1ae7e953 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_types.h
@@ -183,6 +183,7 @@ struct dc_panel_patch {
        unsigned int force_frl;
        unsigned int vsdb_rcc_wa;
        unsigned int delay_hdmi_link_training;
+       unsigned int skip_frl_pre_training;
        unsigned int skip_avmute;
        unsigned int skip_audio_sab_check;
        unsigned int mst_start_top_delay;
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_detection.c 
b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
index a3212fd151d1..24b191d39777 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_detection.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_detection.c
@@ -933,7 +933,7 @@ static bool 
should_verify_link_capability_destructively(struct dc_link *link,
                destrictive = true;
                if (is_hdmi_frl_in_use(link)) {
                        destrictive = false;
-               } else if (link->dc->config.skip_frl_pretraining) {
+               } else if 
(link->local_sink->edid_caps.panel_patch.skip_frl_pre_training) {
                        for (i = 0; i < MAX_PIPES; i++) {
                                if (pipes[i].stream != NULL &&
                                        pipes[i].stream->link == link) {
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
index 70eacb0edfd9..ec74538472ee 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
@@ -2483,7 +2483,6 @@ static bool dcn30_resource_construct(
        dc->caps.post_blend_color_processing = true;
        dc->caps.force_dp_tps4_for_cp2520 = true;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.extended_aux_timeout_support = true;
        dc->caps.dmcub_support = true;

diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
index caeb001dd7de..106f04efed1f 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
@@ -1378,7 +1378,6 @@ static bool dcn302_resource_construct(
        dc->caps.post_blend_color_processing = true;
        dc->caps.force_dp_tps4_for_cp2520 = true;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.extended_aux_timeout_support = true;
        dc->caps.dmcub_support = true;
        dc->caps.max_v_total = (1 << 15) - 1;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
index 58c314237ce6..f41926eb0761 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
@@ -1322,7 +1322,6 @@ static bool dcn303_resource_construct(
        dc->caps.post_blend_color_processing = true;
        dc->caps.force_dp_tps4_for_cp2520 = true;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.extended_aux_timeout_support = true;
        dc->caps.dmcub_support = true;
        dc->caps.max_v_total = (1 << 15) - 1;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
index 15730fe1b9db..97c2cd7045b5 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
@@ -2081,7 +2081,6 @@ static bool dcn31_resource_construct(
        if (dc->config.forceHBR2CP2520)
                dc->caps.force_dp_tps4_for_cp2520 = false;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.dp_hpo = true;
        dc->caps.dp_hdmi21_pcon_support = true;
        dc->caps.edp_dsc_support = true;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
index 0f800f586e08..4e283e4c238c 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
@@ -2057,7 +2057,6 @@ static bool dcn315_resource_construct(
        if (dc->config.forceHBR2CP2520)
                dc->caps.force_dp_tps4_for_cp2520 = false;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.dp_hpo = true;
        dc->caps.dp_hdmi21_pcon_support = true;
        dc->caps.edp_dsc_support = true;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
index efbc2a506046..0c8b37520ec3 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
@@ -1931,7 +1931,6 @@ static bool dcn316_resource_construct(
        if (dc->config.forceHBR2CP2520)
                dc->caps.force_dp_tps4_for_cp2520 = false;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.dp_hpo = true;
        dc->caps.dp_hdmi21_pcon_support = true;
        dc->caps.edp_dsc_support = true;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
index e03dc966e121..697463622a10 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
@@ -2409,7 +2409,6 @@ static bool dcn32_resource_construct(
        if (dc->config.forceHBR2CP2520)
                dc->caps.force_dp_tps4_for_cp2520 = false;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.dp_hpo = true;
        dc->caps.dp_hdmi21_pcon_support = true;
        dc->caps.edp_dsc_support = true;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
index 65f445f38cfb..6ebab0f185c9 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
@@ -1901,7 +1901,6 @@ static bool dcn321_resource_construct(
        dc->caps.post_blend_color_processing = true;
        dc->caps.force_dp_tps4_for_cp2520 = true;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.dp_hpo = true;
        dc->caps.dp_hdmi21_pcon_support = true;
        dc->caps.edp_dsc_support = true;
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
index baf00942b8f3..c94136bf2dcf 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
@@ -2031,7 +2031,6 @@ static bool dcn35_resource_construct(
        if (dc->config.forceHBR2CP2520)
                dc->caps.force_dp_tps4_for_cp2520 = false;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.dp_hpo = true;
        dc->caps.dp_hdmi21_pcon_support = true;

diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
index 75a0a3dc3052..42c8c01efb0b 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
@@ -2004,7 +2004,6 @@ static bool dcn351_resource_construct(
        if (dc->config.forceHBR2CP2520)
                dc->caps.force_dp_tps4_for_cp2520 = false;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.dp_hpo = true;
        dc->caps.dp_hdmi21_pcon_support = true;

diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
index 8e84abdff57a..b7afba548fd4 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
@@ -2001,7 +2001,6 @@ static bool dcn36_resource_construct(
        if (dc->config.forceHBR2CP2520)
                dc->caps.force_dp_tps4_for_cp2520 = false;
        dc->caps.hdmi_hpo = true;
-       dc->config.skip_frl_pretraining = true;
        dc->caps.dp_hpo = true;
        dc->caps.dp_hdmi21_pcon_support = true;

--
2.54.0

Reply via email to