From: Yue Hin Lau Date: Wed, 27 Jun 2018 17:49:20 +0000 (-0400) Subject: drm/amd/display: Add NULL check for local sink in edp_power_control X-Git-Tag: v4.19-rc1~28^2~25^2~48 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6c4fff068f7940993b3ec74a9996f4b514089d1a;p=uclinux-h8%2Flinux.git 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 Reviewed-by: Hugo Hu Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- 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 109d4103d10d..e48eb3056af5 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)