aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4933-drm-amd-display-Add-NULL-check-for-local-sink-in-edp.patch
blob: 98ad6529a19036b21838b957f2f7ecc18df19c9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From f57ab5ff410727061811cd5a64b668b249492209 Mon Sep 17 00:00:00 2001
From: Yue Hin Lau <Yuehin.Lau@amd.com>
Date: Wed, 27 Jun 2018 13:49:20 -0400
Subject: [PATCH 4933/5725] drm/amd/display: Add NULL check for local sink in
 edp_power_control

[WHY]
PNP cause bsod regression fix

[HOW]
Add NULL check

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Hugo Hu <Hugo.Hu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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 298d2ca..8068074 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
@@ -871,9 +871,11 @@ void hwss_edp_power_control(
 			unsigned long long wait_time_ms = 0;
 
 			/* max 500ms from LCDVDD off to on */
-			unsigned long long edp_poweroff_time_ms =
-					500 + link->local_sink->edid_caps.panel_patch.extra_t12_ms;
+			unsigned long long edp_poweroff_time_ms = 500;
 
+			if (link->local_sink != NULL)
+				edp_poweroff_time_ms =
+						500 + link->local_sink->edid_caps.panel_patch.extra_t12_ms;
 			if (link->link_trace.time_stamp.edp_poweroff == 0)
 				wait_time_ms = edp_poweroff_time_ms;
 			else if (duration_in_ms < edp_poweroff_time_ms)
-- 
2.7.4