From: Meenakshikumar Somasundaram <[email protected]>

[Why]
dc debug option disable_fec was not working.

[How]
Check dc debug option disable_fec flag before
enabling fec in dp_should_enable_fec().

Reviewed-by: Wenjing Liu <[email protected]>
Signed-off-by: Meenakshikumar Somasundaram <[email protected]>
Signed-off-by: Tom Chung <[email protected]>
---
 .../drm/amd/display/dc/link/protocols/link_dp_capability.c    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c 
b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
index c33a8c17c38a..701afd2d4ab1 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
@@ -357,7 +357,9 @@ bool dp_should_enable_fec(const struct dc_link *link)
 {
        bool force_disable = false;
 
-       if (link->fec_state == dc_link_fec_enabled)
+       if (link->dc->debug.disable_fec)
+               force_disable = true;
+       else if (link->fec_state == dc_link_fec_enabled)
                force_disable = false;
        else if (link->connector_signal != SIGNAL_TYPE_DISPLAY_PORT_MST &&
                        link->local_sink &&
-- 
2.43.0

Reply via email to