Bug 98374

Summary: [DP] async fbdev initial config leads to DP link train before first modeset: WARN_ON_ONCE(!intel_dp->lane_count)
Product: DRI Reporter: rafael cepeda <rcepeda1993>
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: normal    
Priority: medium CC: freedesktop-bugs, gwhite, intel-gfx-bugs, jkt, manasi.d.navare, mike, rrs
Version: XOrg git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: BSW/CHT, HSW i915 features: display/DP
Attachments:
Description Flags
DMESG output
none
DMESG DRM.DEBUG=14
none
dmesg-t460s-drm-intel-next-2016-11-08-979-gaa74f4d
none
dmesg with drm.debug=14 drm-intel-nightly: 2016y-11m-21d-18h-22m-22s none

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.