Blob Blame History Raw
From 7ae1726dee1e984e76dc36ee7027e1dbe7ac9200 Mon Sep 17 00:00:00 2001
From: Anthony Koo <Anthony.Koo@amd.com>
Date: Fri, 17 Apr 2020 18:26:47 -0400
Subject: drm/amd/display: fix bug in the logic for panel power control
Git-commit: ffadb9d6520843500d848f5f882ae74cc1aa11ce
Patch-mainline: v5.8-rc1
References: jsc#SLE-12680, jsc#SLE-12880, jsc#SLE-12882, jsc#SLE-12883, jsc#SLE-13496, jsc#SLE-15322

[Why]
there's a bug in the new logic for panel power control.  the check is
wrong, and will skip panel power control under the wrong conditions.

[How]
fix to check for NULL panel_cntl

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Ashley Thomas <Ashley.Thomas2@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Patrik Jakobsson <pjakobsson@suse.de>
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index ab758bceb1e7..85ecd6814421 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -796,7 +796,7 @@ void dce110_edp_power_control(
 		return;
 	}
 
-	if (link->panel_cntl)
+	if (!link->panel_cntl)
 		return;
 
 	if (power_up !=
-- 
2.28.0