Bug 99572

Summary: [BXT DP-MST] System hang/crash when plugging in USB typeC DP MST monitor
Product: DRI Reporter: Nathan Ciobanu <nathan.d.ciobanu>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: critical    
Priority: medium CC: intel-gfx-bugs, jim.bride, manasi.d.navare, nathan.d.ciobanu
Version: DRI git   
Hardware: x86-64 (AMD64)   
OS: other   
Whiteboard:
i915 platform: BXT i915 features: display/DP MST
Attachments:
Description Flags
stack trace
none
attachment-9910-0.html none

Description Nathan Ciobanu 2017-01-28 00:40:45 UTC
Created attachment 129186 [details]
stack trace

Steps to reproduce:
- Connect a 4K DP MST monitor to the USB-C port on a BXT system using a USB-C to DP dongle while the system is up
- Or boot a BXT system with a 4K DP MST monitor attached to the USB-C port using a USB-C to DP dongle

Result:
- The system hangs or reboots immediately.


Notes:

Tentative fix:
https://lists.freedesktop.org/archives/intel-gfx/2017-January/116654.html

Adds the missing INTEL_OUTPUT_DP_MST case in bxt_get_dpll() to correctly
initialize the crtc_state and port plls when link training a DP MST monitor
on BXT/APL devices.
Comment 1 Shawn Lee 2017-01-28 00:45:00 UTC
Created attachment 129187 [details]
attachment-9910-0.html

Dear sender,

OOO from ww4.5 to ww5.4 for chinese new year. Email response will be slow/delay. Sorry for the inconvenience.

Best regards,
Shawn
Comment 2 Nathan Ciobanu 2017-01-28 01:05:45 UTC
I added the following check to make sure I trigger a stack trace otherwise the system would reboot without giving me the crash log:

@@ -1862,6 +1863,10 @@ bool bxt_ddi_dp_set_dpll_hw_state(int clock,
        memset(&crtc_state->dpll_hw_state, 0,
               sizeof(crtc_state->dpll_hw_state));

+       if (!memcmp(&zeroes, &dpll_hw_state,
+              sizeof(crtc_state->dpll_hw_state)))
+           BUG();
+
        crtc_state->dpll_hw_state = dpll_hw_state;

        if (encoder->type == INTEL_OUTPUT_DP_MST) {
Comment 3 yann 2017-02-03 12:52:15 UTC
Reference to Shawn Lee's patch: https://patchwork.freedesktop.org/series/17815/
Comment 4 Jani Nikula 2017-02-03 13:36:12 UTC
Presumed fixed by

commit 0aab2c721d81590012a5021a516f00666646741f
Author: Lee, Shawn C <shawn.c.lee@intel.com>
Date:   Fri Feb 3 12:32:09 2017 +0800

    drm/i915/bxt: Add MST support when do DPLL calculation

Please reopen if the problem persists with that.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.