Bug 98374 - [DP] async fbdev initial config leads to DP link train before first modeset: WARN_ON_ONCE(!intel_dp->lane_count)
Summary: [DP] async fbdev initial config leads to DP link train before first modeset: ...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
: 99098 99113 99655 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-21 19:00 UTC by rafael cepeda
Modified: 2017-06-30 20:58 UTC (History)
7 users (show)

See Also:
i915 platform: BSW/CHT, HSW
i915 features: display/DP


Attachments
DMESG output (2.09 KB, text/plain)
2016-10-21 19:00 UTC, rafael cepeda
no flags Details
DMESG DRM.DEBUG=14 (88.28 KB, text/plain)
2016-10-24 16:11 UTC, rafael cepeda
no flags Details
dmesg-t460s-drm-intel-next-2016-11-08-979-gaa74f4d (52.03 KB, text/plain)
2016-11-08 14:26 UTC, Jan Kundrát
no flags Details
dmesg with drm.debug=14 drm-intel-nightly: 2016y-11m-21d-18h-22m-22s (70.67 KB, text/x-matlab)
2016-11-22 14:25 UTC, Piotr Kasp.
no flags Details

Description rafael cepeda 2016-10-21 19:00:45 UTC
Created attachment 127453 [details]
DMESG output
Comment 1 Jani Nikula 2016-10-24 14:22:13 UTC
Please add drm.debug=14 module parameter, and attach dmesg all the way from boot to reproducing the problem.
Comment 2 rafael cepeda 2016-10-24 16:11:05 UTC
Created attachment 127516 [details]
DMESG DRM.DEBUG=14

as requested
Comment 3 Jani Nikula 2016-10-24 16:58:51 UTC
Async fbdev initial config calls back to intel_dp_detect before we've done the first proper modeset and set the lane_count.

There are a couple of commits that are the *messenger* here that this will bisect to, but must not be reverted:

commit d4cb3fd9b548b8bfe2a712ec920b9ebabd3547ab
Author: Matthew Auld <matthew.auld@intel.com>
Date:   Wed Oct 19 22:29:53 2016 +0100

    drm/i915/dp: add lane_count check in intel_dp_check_link_status

and related

commit dd788090822300a66ff469ae9e50f6d28d124eb8
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Thu Jul 28 17:55:04 2016 +0300

    drm/i915: Warn about aux msg buffer vs. size mismatch

Apparently there was a commit to mitigate related problems in

commit d626f34573551479f62b09d4df09efc4af88136d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jun 21 09:16:53 2016 +0100

    drm/i915/fbdev: Perform async fbdev initialisation much later

Possibly the problem wasn't introduced not so much by async fbdev but rather changes in intel_dp_detect.
Comment 4 Jan Kundrát 2016-11-08 14:26:05 UTC
Created attachment 127844 [details]
dmesg-t460s-drm-intel-next-2016-11-08-979-gaa74f4d

I'm getting a similar error during boot with drm-intel-next-2016-11-08-979-gaa74f4d on SKL Thinkpad T460s.
Comment 5 Ville Syrjala 2016-11-11 17:33:40 UTC
Here's one way to fix it: https://patchwork.freedesktop.org/patch/101473/
But looks like Daniel wants something fancier.
Comment 6 Chris Wilson 2016-11-17 22:03:03 UTC
It's not just async fbdev. It's just complete garbage in

commit 7d23e3c37bb3fc6952dc84007ee60cb533fd2d5c
Author: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Date:   Wed Mar 30 18:05:23 2016 +0530

    drm/i915: Cleaning up intel_dp_hpd_pulse
    
    Current DP detection has DPCD operations split across
    intel_dp_hpd_pulse and intel_dp_detect which contains
    duplicates as well. Also intel_dp_detect is called
    during modes enumeration as well which will result
    in multiple dpcd operations. So this patch tries
    to solve both these by bringing all DPCD operations
    in one single function and make intel_dp_detect
    use existing values instead of repeating same steps.
Comment 7 Piotr Kasp. 2016-11-22 14:25:48 UTC
Created attachment 128148 [details]
dmesg with drm.debug=14 drm-intel-nightly: 2016y-11m-21d-18h-22m-22s

on Broxton maniboard with converter chip on mainboard DP1.2 to HDMI 2.0
Comment 8 Daniel Hahler 2016-11-25 20:29:14 UTC
@Chris

> It's not just async fbdev. It's just complete garbage in … drm/i915: Cleaning up intel_dp_hpd_pulse

Any plans to fix this?
Have there fixes landed already in this regard?
Comment 9 Jani Nikula 2016-12-15 15:06:48 UTC
*** Bug 99098 has been marked as a duplicate of this bug. ***
Comment 10 Ritesh Raj Sarraf 2016-12-15 16:30:45 UTC
Thank you for adding me to this bug. I'm including HSW in the i915 platform list, That is where I'm seeing this problem.
Comment 11 Jani Nikula 2016-12-19 09:47:27 UTC
*** Bug 99113 has been marked as a duplicate of this bug. ***
Comment 12 Manasi 2017-03-30 20:13:21 UTC
The WARN_ON has been removed and replaced by a conditional check so this warning should not be seen any more. Also I am working on a patch for properly fixing this.

Regards
Manasi
Comment 13 Chris Wilson 2017-03-30 21:44:59 UTC
*** Bug 99655 has been marked as a duplicate of this bug. ***
Comment 14 Armando Antonio 2017-06-29 19:42:49 UTC
Hello, 
I was trying to reproduce this issue and I could not find any message in dmesg and kern.log.

Configuration:
======================================
        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


Regards.


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.