Bug 94431

Summary: i915/intel_display.c check_crtc_state throws multiple warnings on resume from disk
Product: Drivers Reporter: Manuel Krause (manuelkrause)
Component: Video(DRI - Intel)Assignee: intel-gfx-bugs (intel-gfx-bugs)
Status: RESOLVED CODE_FIX    
Severity: normal CC: ander.conselvan.de.oliveira, intel-gfx-bugs, manuelkrause
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 3.19.0 ... 4.1.0-rc5 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg for a 3.19.0
dmesg for a 4.0.0-rc1
dmesg of 4.0.4-vanilla with drm.debug=0x1e
Fix for 4.1-rc6

Description Manuel Krause 2015-03-06 20:45:18 UTC
Created attachment 169571 [details]
dmesg for a 3.19.0

Hello,
my system is a HP Compaq 6730b notebook with "Integrated Graphics Chipset: Intel(R) GM45" 
[    26.830] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[    26.910] (II) Module intel: vendor="X.Org Foundation"
[    26.910] 	compiled for 1.17.0, module version = 2.99.917
[    26.910] 	Module class: X.Org Video Driver
[    26.910] 	ABI class: X.Org Video Driver, version 19.0
Using Kernel Mode Setting driver: i915, version 1.6.0 20141121 
(info from Xorg.0.log);
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
Kernel driver in use: i915
Kernel modules: i915 
(info from lspci)

Since kernel 3.19.0 I get multiple WARNINGs on each resume from suspend-to-disk (hibernation). Suspend-to-RAM (sleep) is fine == without WARNING.
And I only get the WARNINGs -- there seem to be no problems at all.
Kernel 4.0.0-rc1 shows the same behaviour.

At first I'd attach the dmesg of a 3.19.0 and then of a 4.0.0-rc1 kernel.
BTW, the 3.19.0 is already patched with f9b61ff6bce9a44555324b29e593fdffc9a115bc, to fix the related problem on here.

Please, let me know if you want me to /and how to generate additional debugging output that you may need.

Best regards,
Manuel
Comment 1 Manuel Krause 2015-03-06 20:46:39 UTC
Created attachment 169581 [details]
dmesg for a 4.0.0-rc1
Comment 2 Manuel Krause 2015-03-06 20:56:02 UTC
The detailed names of the WARNINGs / ERRORS are:

[  296.756803] WARNING: CPU: 0 PID: 56 at drivers/gpu/drm/i915/intel_display.c:10845 check_crtc_state+0xaa0/0xec0 [i915]()
[  296.756804] crtc's computed active state doesn't match tracked active state (expected 0, found 1)

[  296.757060] [drm:check_crtc_state [i915]] *ERROR* mismatch in adjusted_mode.flags(DRM_MODE_FLAG_NHSYNC) (expected 2, found 0)

[  296.757077] WARNING: CPU: 0 PID: 56 at drivers/gpu/drm/i915/intel_display.c:10872 check_crtc_state+0x7fc/0xec0 [i915]()
[  296.757077] pipe state doesn't match!

(for 3.19.0 kernel)
Comment 3 Ander Conselvan de Oliveira 2015-05-11 07:57:12 UTC
Could you add drm.debug=0x1e to your kernel command line and produce new logs?
Comment 4 Manuel Krause 2015-05-29 20:27:14 UTC
Created attachment 178321 [details]
dmesg of 4.0.4-vanilla with drm.debug=0x1e

Please accept my apologies for the late reply. dmesg of 4.0.4-vanilla attached according to your Comment 3.

The issue persists, so far, until 4.1.0-rc5. 3.18.14 is not affected.

Best regards, and thank you for your patience,
Manuel Krause
Comment 5 Ander Conselvan de Oliveira 2015-06-01 12:42:39 UTC
http://lists.freedesktop.org/archives/intel-gfx/2015-June/067788.html
Comment 6 Ander Conselvan de Oliveira 2015-06-01 12:44:10 UTC
Created attachment 178461 [details]
Fix for 4.1-rc6

Please test this patch against 4.1-rc6.
Comment 7 Manuel Krause 2015-06-01 20:08:07 UTC
I've applied the patch to 4.1.0-rc5, as openSUSE has not provided the -rc6 so far.
Anyways, with your patch the warnings are gone away.

Hopefully, you can initiate the backport for 4.0.x kernel?!

BR, Manuel Krause
Comment 8 Jani Nikula 2015-06-17 12:12:12 UTC
Fixed by

commit e62d8dc0aa9f7493bcee3cbc4bf666a23a2d2f17
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Tue Jun 16 11:49:43 2015 +0300

    drm/i915: Don't check modeset state in the hw state force restore path

in drm-intel-next-fixes, will be merged for v4.2.