Bug 99272 - [DP][IGT]Displayport hotplug detection races with nonblocking modeset.
Summary: [DP][IGT]Displayport hotplug detection races with nonblocking modeset.
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: high major
Assignee: Maarten Lankhorst
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: PatchSubmitted
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-04 12:37 UTC by Maarten Lankhorst
Modified: 2018-01-05 17:23 UTC (History)
1 user (show)

See Also:
i915 platform: ALL
i915 features: display/atomic, display/DP


Attachments
dmesg warning indicating the race (1.80 KB, text/plain)
2017-01-04 12:37 UTC, Maarten Lankhorst
no flags Details
execution output HWS (118.54 KB, text/plain)
2017-06-30 20:12 UTC, Armando Antonio
no flags Details
execution output KBL (118.54 KB, text/plain)
2017-06-30 20:12 UTC, Armando Antonio
no flags Details

Description Maarten Lankhorst 2017-01-04 12:37:18 UTC
Created attachment 128751 [details]
dmesg warning indicating the race

With nonblocking modeset enabled in i915, there's a testcase failure in kms_atomic_transition and kms_cursor_legacy that shows that nonblocking modeset can race against hotplug.

Relevant testcases:
kms_atomic_transition.1x-modeset-transitions-nonblocking
kms_cursor_legacy.nonblocking-modeset-vs-cursor-atomic
kms_cursor_legacy.long-nonblocking-modeset-vs-cursor-atomic (same, but more iterations)
Comment 1 Jani Saarinen 2017-01-18 11:48:06 UTC
HI, All listed 3 tc's are now passing both on CI and QA execution. 
Maybew resolved / close now?
Comment 2 Maarten Lankhorst 2017-01-18 14:22:58 UTC
It's not fixed upstream yet, the issue is not 100% reliable to trigger.

Series at https://patchwork.freedesktop.org/series/17712/
Comment 3 Jani Saarinen 2017-06-13 06:28:28 UTC
Maarten, is this still issue?
Comment 4 Maarten Lankhorst 2017-06-13 11:18:12 UTC
Yeah, the old patches have bitrotten since we added connection_mutex to link detection. So it needs some minor rework to rebase. :)
Comment 5 Maarten Lankhorst 2017-06-14 09:10:45 UTC
New series at https://patchwork.freedesktop.org/series/25761/
Comment 6 Armando Antonio 2017-06-30 20:08:07 UTC
Hello, I run the test cases and looks good, all the test cases finished with SUCCESS. I executed this test in HSW and KBL and these are the hardware and software configurations:

======================================
        Graphic stack
======================================

======================================
             Software
======================================
kernel version              : 4.12.0-rc3-drm-tip-ww22-commit-187376e+
architecture                : x86_64
os version                  : Ubuntu 17.04
os codename                 : zesty
kernel driver               : i915
bios revision               : 4.6
bios release date           : 03/02/2017

======================================
        Graphic drivers
======================================
mesa                        : 17.0.3
modesetting                 : modesetting_drv.so
xorg-xserver                : 1.19.3
libdrm                      : 2.4.81
cairo                       : 1.14.8
xserver                     : X.Org X Server 1.19.99.1
intel-gpu-tools (tag)       : intel-gpu-tools-1.18-211-g00ce341b
intel-gpu-tools (commit)    : 00ce341b

======================================
             Hardware
======================================
platform                   : HSW-Nuc
motherboard id             : D54250WYK
form factor                : Desktop
cpu family                 : Core i5
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
gpu card                   : Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
memory ram                 : 3.79 GB
max memory ram             : 16 GB
display resolution         : 1600x900
cpu thread                 : 4
cpu core                   : 2
cpu model                  : 69
cpu stepping               : 1
socket                     : Socket LGA1150
signature                  : Type 0, Family 6, Model 69, Stepping 1
hard drive                 : 223GiB (240GB)
current cd clock frequency : 450000 kHz
maximum cd clock frequency : 450000 kHz
displays connected         : DP-1

======================================
             Firmware
======================================

======================================
             kernel parameters
======================================

quiet splash fastboot drm.debug=0xe

======================================
        Graphic stack
======================================
======================================
             Software
======================================
kernel version              : 4.12.0-rc3-drm-tip-ww22-commit-187376e+
architecture                : x86_64
os version                  : Ubuntu 17.04
os codename                 : zesty
kernel driver               : i915
bios revision               : 5.6
bios release date           : 05/11/2017
======================================
        Graphic drivers
======================================
mesa                        : 17.0.3
modesetting                 : modesetting_drv.so
xorg-xserver                : 1.19.3
libdrm                      : 2.4.81
cairo                       : 1.14.8
xserver                     : X.Org X Server 1.19.99.1
intel-gpu-tools (tag)       : intel-gpu-tools-1.18-211-g00ce341b
intel-gpu-tools (commit)    : 00ce341b
======================================
             Hardware
======================================
platform                   : BDW
motherboard id             : NUC5i7RYB
form factor                : Desktop
cpu family                 : Core i7
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
gpu card                   : Intel Corporation Iris Graphics 6100 (rev 09) (prog-if 00 [VGA controller])
memory ram                 : 15.58 GB
max memory ram             : 16 GB
display resolution         : 1600x900
cpu thread                 : 4
cpu core                   : 2
cpu model                  : 61
cpu stepping               : 4
socket                     : Socket BGA1168
signature                  : Type 0, Family 6, Model 61, Stepping 4
hard drive                 : 111GiB (120GB)
current cd clock frequency : 337500 kHz
maximum cd clock frequency : 540000 kHz
displays connected         : DP-1
======================================
             Firmware
======================================
======================================
             kernel parameters
======================================
quiet splash fastboot drm.debug=0xe


Regards.
Comment 7 Armando Antonio 2017-06-30 20:12:15 UTC
Created attachment 132376 [details]
execution output HWS
Comment 8 Armando Antonio 2017-06-30 20:12:57 UTC
Created attachment 132377 [details]
execution output KBL
Comment 9 Maarten Lankhorst 2017-07-03 11:19:06 UTC
This bug is still open, please don't close bugs if the fix is not upstream.

Ville mentioned on the patches that we should really do link training in the hotplug_work only, getting rid of some locking issues in this patch. I've looked and it seems he has posted a series that does this before.

https://www.spinics.net/lists/intel-gfx/msg102007.html
Comment 10 Maarten Lankhorst 2017-12-08 11:19:26 UTC
commit 42e5e65765265485ecf2a480c244d76c2c624449
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Nov 13 17:01:40 2017 +0100

    drm/i915: sync dp link status checks against atomic commmits


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.