Bug 97060 - [Bisected][Regression]Screen goes blank after boot, kernel 4.7 vs 4.6
Summary: [Bisected][Regression]Screen goes blank after boot, kernel 4.7 vs 4.6
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Ville Syrjala
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-23 15:32 UTC by Alexey Shumitsky
Modified: 2017-07-24 22:41 UTC (History)
4 users (show)

See Also:
i915 platform: SNB
i915 features: display/LVDS


Attachments
dmesg kernel 4.7-rc7 (111.33 KB, text/x-log)
2016-07-23 15:32 UTC, Alexey Shumitsky
no flags Details
dmesg kernel 4.6 (112.76 KB, text/x-log)
2016-07-23 15:34 UTC, Alexey Shumitsky
no flags Details
4.8-rc3 bad (66.76 KB, text/plain)
2016-09-05 18:05 UTC, Tony Vroon
no flags Details
4.6.7 good (60.69 KB, text/plain)
2016-09-05 18:05 UTC, Tony Vroon
no flags Details
cleaned dmesg 'opregion_panel_type_stuff' build on Sandy Bridge (40.86 KB, text/plain)
2016-09-06 18:03 UTC, Marco Krüger
no flags Details
dmesg kernel 4.8.0-rc4+ (113.52 KB, text/x-log)
2016-09-06 20:31 UTC, Alexey Shumitsky
no flags Details
cleaned dmesg patched version (35.71 KB, text/plain)
2016-09-06 20:38 UTC, Marco Krüger
no flags Details
cleaned dmesg quirk version (40.27 KB, text/plain)
2016-09-08 16:40 UTC, Marco Krüger
no flags Details
dmesg kernel 4.8.0-rc4+ opregion_panel_type_quirk_2 (113.67 KB, text/x-log)
2016-09-09 12:48 UTC, Alexey Shumitsky
no flags Details
cleared dmesg quirk2 version (33.01 KB, text/plain)
2016-09-09 17:31 UTC, Marco Krüger
no flags Details

Description Alexey Shumitsky 2016-07-23 15:32:57 UTC
Created attachment 125278 [details]
dmesg kernel 4.7-rc7

With kernel 4.7-rc7 (drm-intel-nightly) laptop screen (LVDS) goes blank after inteldrmfb is loaded.


4.7.0-rc7+ #1 SMP Sat Jul 23 16:05:00 CEST 2016 x86_64 x86_64 x86_64 GNU/Linux

It appears to me the problem is with setting panel to wrong mode:

[    2.737896] [drm:parse_lfp_panel_data] Found panel mode in BIOS VBT tables:
[    2.737900] [drm:drm_mode_debug_printmodeline] Modeline 0:"1366x768" 0 76110 1366 1397 1462 1560 768 772 784 814 0x8 0xa
[    2.737902] [drm:parse_lfp_panel_data] VBT initial LVDS value 300


While with previous kernel, 4.6, there was:

[    4.684175] [drm:parse_lfp_panel_data] Found panel mode in BIOS VBT tables:
[    4.684177] [drm:drm_mode_debug_printmodeline] Modeline 0:"1920x1080" 0 144200 1920 1968 2040 2116 1080 1083 1088 1137 0x8 0xa
[    4.684178] [drm:parse_lfp_panel_data] VBT initial LVDS value 33c

My notebook uses fullhd panel, so resolution should be 1920x1080 clearly.

Full dmesg obtained with drm.debug=0xe is attached.
Comment 1 Alexey Shumitsky 2016-07-23 15:34:03 UTC
Created attachment 125279 [details]
dmesg kernel 4.6

dmesg from kernel 4.6 for comparison.
Comment 2 Marco Krüger 2016-07-27 19:29:32 UTC
I can confirm the issue for the 4.7.0 version. I get the same wrong resolution and the display stays blank.
Comment 3 Marco Krüger 2016-09-03 18:33:44 UTC
A bisect gave me the commit 'drm/i915: Get panel_type from OpRegion panel details' (a05628195a0d9f3173dd9aa76f482aef692e46ee), which introduced the blank panel.
Comment 4 Tony Vroon 2016-09-05 18:04:14 UTC
Also an issue on Fujitsu Lifebook E744. Last known good kernel 4.6.7; still bad on 3.8-rc5. I was unable to cleanly revert a05628195a0d9f3173dd9aa76f482aef692e46ee to validate the bisection.

However, the problem is identical, the modeline that is chosen is an incorrect, lower resolution:
-[drm:drm_mode_debug_printmodeline] Modeline 0:"1600x900" 0 107800 1600 1648 1
680 1920 900 903 908 936 0x8 0xa
-[drm:parse_lfp_panel_data] VBT initial LVDS value 30033c
+[drm:drm_mode_debug_printmodeline] Modeline 0:"1366x768" 0 70000 1366 1402 1438 1476 768 772 780 790 0x8 0xa
+[drm:parse_lfp_panel_data] VBT initial LVDS value 300
Comment 5 Tony Vroon 2016-09-05 18:05:13 UTC
Created attachment 126227 [details]
4.8-rc3 bad
Comment 6 Tony Vroon 2016-09-05 18:05:40 UTC
Created attachment 126228 [details]
4.6.7 good
Comment 7 Jani Nikula 2016-09-06 08:41:18 UTC
Another report of the same disguised as a patch http://patchwork.freedesktop.org/patch/msgid/1472398126-1095-2-git-send-email-aarcange@redhat.com

We need to revert.
Comment 8 Jani Nikula 2016-09-06 08:42:23 UTC
Both these two need to be reverted:

commit aeddda06c1a704bb97c8a7bfe7a472120193bd56
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Jul 12 15:00:37 2016 +0300

    drm/i915: Ignore panel type from OpRegion on SKL

commit a05628195a0d9f3173dd9aa76f482aef692e46ee
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Apr 11 10:23:51 2016 +0300

    drm/i915: Get panel_type from OpRegion panel details
Comment 9 Ville Syrjala 2016-09-06 09:28:47 UTC
I was just getting hopeful that we might go with gen>=5 check since that would preserve the opregion handling for the original g4x machine which clearly needed it. Unfortunately bug 97443 says a 965gm regressed as well, so that plan won't work either :(
Comment 10 Jani Nikula 2016-09-06 09:31:38 UTC
Also bug 97363.
Comment 11 Ville Syrjala 2016-09-06 12:10:24 UTC
Can you try 
git://github.com/vsyrjala/linux.git opregion_panel_type_stuff

I'm not expecting it would really fix the problem, but it will at least show us the full response from the BIOS.
Comment 12 Marco Krüger 2016-09-06 18:03:34 UTC
Created attachment 126251 [details]
cleaned dmesg 'opregion_panel_type_stuff' build on Sandy Bridge

@Ville I tried your kernel tree on my i7-2640M machine.
Comment 13 Ville Syrjala 2016-09-06 18:39:34 UTC
(In reply to Marco Krüger from comment #12)
> Created attachment 126251 [details]
> cleaned dmesg 'opregion_panel_type_stuff' build on Sandy Bridge
> 
> @Ville I tried your kernel tree on my i7-2640M machine.

Thanks. I pushed a new patch to the branch which I think should get us back on track with your machine. So please pull again, and retest.

I don't really know if it's any more correct than the current code though, and I don't yet know if it works for the original machine that needs the opregion panel type.
Comment 14 Alexey Shumitsky 2016-09-06 20:31:09 UTC
Created attachment 126254 [details]
dmesg kernel 4.8.0-rc4+
Comment 15 Marco Krüger 2016-09-06 20:38:01 UTC
Created attachment 126255 [details]
cleaned dmesg patched version

Patched version works for me.
Comment 16 Ville Syrjala 2016-09-08 09:15:02 UTC
I had to resort to a quirk to fix this for all machines. Please test this branch:

git://github.com/vsyrjala/linux.git opregion_panel_type_quirk
Comment 17 Marco Krüger 2016-09-08 16:40:34 UTC
Created attachment 126312 [details]
cleaned dmesg quirk version

Quirk version does work for me as well.
Comment 18 Ville Syrjala 2016-09-09 08:46:22 UTC
(In reply to Marco Krüger from comment #17)
> Created attachment 126312 [details]
> cleaned dmesg quirk version
> 
> Quirk version does work for me as well.


I had to revise the patch a bit more to make it actually work on the original machine that needs the quirk:
git://github.com/vsyrjala/linux.git opregion_panel_type_quirk_2

Please test to make sure I didn't fumble anything for other machines. Fingers crossed that this is the last revision...
Comment 19 Alexey Shumitsky 2016-09-09 12:46:44 UTC
(In reply to Ville Syrjala from comment #18)
> I had to revise the patch a bit more to make it actually work on the
> original machine that needs the quirk:
> git://github.com/vsyrjala/linux.git opregion_panel_type_quirk_2
> 
> Please test to make sure I didn't fumble anything for other machines.
> Fingers crossed that this is the last revision...

Can confirm that it works now with my machine either (opregion_panel_type_quirk_2).
Comment 20 Alexey Shumitsky 2016-09-09 12:48:13 UTC
Created attachment 126373 [details]
dmesg kernel 4.8.0-rc4+ opregion_panel_type_quirk_2
Comment 21 Marco Krüger 2016-09-09 17:31:49 UTC
Created attachment 126415 [details]
cleared dmesg quirk2 version

Yep, quirk2 is working, too.
Comment 22 yann 2016-09-13 09:37:39 UTC
Patch submitted and under review: https://patchwork.freedesktop.org/series/12380/
Comment 23 yann 2016-09-13 09:39:39 UTC
Resolving as fixed and waiting for patch to be merged and tested to close it.
Comment 24 Jani Nikula 2016-09-13 13:12:24 UTC
(In reply to yann from comment #23)
> Resolving as fixed and waiting for patch to be merged and tested to close it.

Please let's resolve fixed only after the patch has been merged. Thanks.
Comment 25 Jani Nikula 2016-09-14 09:37:28 UTC
Fixed by

commit ea54ff4008892b46c7a3e6bc8ab8aaec9d198639
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Sep 13 12:22:19 2016 +0300

    drm/i915: Ignore OpRegion panel type except on select machines

in drm-intel-fixes.


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.