Created attachment 134984 [details]
dmesg from drm-tip with drm.debug=0x1e (commit: 9dd506b9e3b79799503694e9c1bb5aba0d7d72eb)
Kernel version: At least since 4.9 (previous versions unteseted), up
until latest drm-tip
Linux distribution: Archlinux
Machine model: MSI GE63VF 7RF (Intel i7 7700HQ with HD Graphics 630)
Display connector: eDP
While booting, my laptop's screen turns black (with backlights on) when
the i915 module is loaded. The virtual console doesn't show up and Xorg
wont start. The only way to get my virtual console displayed is by
passing nomodeset as kernel parameter. I've observed this issue on
kernel version 4.9, 4.13, 4.14-rc5 and finally on the current head of
drm-tip. The following warning can be noticed with the latest drm-tip:
> [ 16.096671] unknown DP link BW code 0, using 162000
> [ 16.096685] ------------[ cut here ]------------
> [ 16.096688] WARNING: CPU: 0 PID: 316 at drivers/gpu/drm/drm_dp_helper.c:157 drm_dp_bw_code_to_link_rate+0x3b/0x50 [drm_kms_helper]
Since it's a bit long, I didn't paste the entire warning, it can be found
in the enclosed dmesg.
I noticed that the warning location changed between the kernel mainline
and the drm-tip branch, but it seems to refer to the same problem. Here
are the first line of the warning on the kernel mainline (if it's
required, I could provide this dmesg too):
> invalid max DP link bw val 0, using 1.62Gbps
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 318 at drivers/gpu/drm/i915/intel_dp.c:144 intel_dp_num_rates+0x3b/0x50 [i915]
Also, this only affects my laptop's screen, I can use an external
display since it goes through my Nvidia card.
If you need any further information, please just ask.
I think the problem is that your display has incorrect eDP DPCD information (bit 3 of DPCD register 0x006 is not set, instead the whole register is set to 0x03). Please try this debug patch to see if it helps:
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index aa75f55eeb61..b2bb7d2941f3 100644
@@ -3736,8 +3736,7 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
/* Read the eDP Display control capabilities registers */
- if ((intel_dp->dpcd[DP_EDP_CONFIGURATION_CAP] & DP_DPCD_DISPLAY_CONTROL_CAPABLE) &&
- drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
+ if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd),
Please let us know the contents of that "EDP DPCD" debug message with this change.
Thanks for your reply.
The patch indeed helps : with it, my virtual console now shows up
successfully without nomodeset.
Here's the content of EDP DPCD with the debug patch:
> $ dmesg | grep "EDP DPCD"
> [ 19.924664] [drm:intel_dp_init_connector [i915]] EDP DPCD : 12 00 00
(In reply to Nicolas P. from comment #2)
> The patch indeed helps : with it, my virtual console now shows up
> successfully without nomodeset.
Thanks for testing.
> Here's the content of EDP DPCD with the debug patch:
> > $ dmesg | grep "EDP DPCD"
> > [ 19.924664] [drm:intel_dp_init_connector [i915]] EDP DPCD : 12 00 00
Auch, that's garbage too, in violation of the eDP spec. :(
I'll try to cook up something.
Effectively same patch as comment #1, with polish:
Can you please attach the entire DPCD here for posterity? Oh and EDID would be nice as well.
This should normally work (needs CONFIG_DRM_DP_AUX_CHARDEV=y in the kernel config):
cat /dev/drm_dp_aux0 > dpcd
But if there are read errors you will have to use someting like ddrescue to read it out.
For the EDID you can use:
cat /sys/class/drm/card0-eDP-1/edid > edid
Jani Nikula 2017-10-26 14:36:25 UTC:
> Effectively same patch as comment #1, with polish:
Thanks a lot. :)
Ville Syrjala 2017-10-26 14:49:59 UTC:
> Can you please attach the entire DPCD here for posterity? Oh and EDID would be nice as well.
Sure, I will attach them right away.
Created attachment 135089 [details]
Created attachment 135090 [details]
Author: Jani Nikula <email@example.com>
Date: Thu Oct 26 17:29:31 2017 +0300
drm/i915/edp: read edp display control registers unconditionally
and cc: stable to backport it to stable kernels.
Thanks for the report and testing.