Bug 90462 - [SKL Regression]many kms_flip and kms_cursor_crc subcases cause [drm:check_crtc_state [i915]] *ERROR* mismatch in dpll_hw_state.ctrl1 (expected 0x00000000, found 0x00000001)
Summary: [SKL Regression]many kms_flip and kms_cursor_crc subcases cause [drm:check_c...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: highest critical
Assignee: Ander Conselvan de Oliveira
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 05:20 UTC by lu hua
Modified: 2017-01-10 17:29 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (124.77 KB, text/plain)
2015-05-15 05:20 UTC, lu hua
no flags Details
Possible fix (4.21 KB, patch)
2015-05-15 10:30 UTC, Ander Conselvan de Oliveira
no flags Details | Splinter Review

Description lu hua 2015-05-15 05:20:58 UTC
Created attachment 115794 [details]
dmesg

==System Environment==
--------------------------
Regression: yes

good commit:  de4de566f84b87f4d5f8265b11932088adb19896(dinq)
bad commit: 65de797816eadb227c45b0127d7ff92410fa3814(dinq)

Non-working platforms: SKL

==kernel==
--------------------------
drm-intel-nightly/6cf0fff478fa64991c2b7f2a44f2815d7a43a0b5
commit 6cf0fff478fa64991c2b7f2a44f2815d7a43a0b5
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed May 13 11:29:25 2015 +0200

    drm-intel-nightly: 2015y-05m-13d-09h-28m-49s UTC integration manifest

==Bug detailed description==
-----------------------------
It causes <3>[  244.272369] [drm:check_crtc_state [i915]] *ERROR* mismatch in dpll_hw_state.ctrl1 (expected 0x00000000, found 0x00000001) on SKL with drm-intel-nightly kernel and drm-intel-next-queued kernel. 

It impacts 50+ cases.
run ./kms_flip --run-subtest blt-flip-vs-dpms 
output:
IGT-Version: 1.10-gc4ec47b (x86_64) (Linux: 4.1.0-rc3_drm-intel-nightly_6cf0ff_20150514+ x86_64)
Using monotonic timestamps
Beginning blt-flip-vs-dpms on crtc 20, connector 34
  3200x1800 60 3200 3248 3280 3316 1800 1802 1807 1816 0xa 0x48 361310
...........
blt-flip-vs-dpms on crtc 20, connector 34: PASSED

Beginning blt-flip-vs-dpms on crtc 25, connector 34
  3200x1800 60 3200 3248 3280 3316 1800 1802 1807 1816 0xa 0x48 361310
............
blt-flip-vs-dpms on crtc 25, connector 34: PASSED

Beginning blt-flip-vs-dpms on crtc 30, connector 34
  3200x1800 60 3200 3248 3280 3316 1800 1802 1807 1816 0xa 0x48 361310
............
blt-flip-vs-dpms on crtc 30, connector 34: PASSED

Subtest blt-flip-vs-dpms: SUCCESS (67.404s)

dmesg:
[  256.217620] [drm:check_crtc_state [i915]] *ERROR* mismatch in dpll_hw_state.ctrl1 (expected 0x00000000, found 0x00000001)
[  256.350817] ------------[ cut here ]------------
[  256.350854] WARNING: CPU: 0 PID: 5243 at drivers/gpu/drm/i915/intel_display.c:12094 check_crtc_state+0xb67/0xbd1 [i915]()
[  256.350857] pipe state doesn't match!
[  256.350860] Modules linked in: dm_mod snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ppdev snd_hda_intel snd_hda_codec pcspkr snd_hda_core snd_hwdep snd_pcm i2c_i801 snd_timer snd soundcore wmi battery parport_pc parport ac acpi_cpufreq i915 button video drm_kms_helper drm joydev
[  256.350954] CPU: 0 PID: 5243 Comm: kms_flip Tainted: G        W       4.1.0-rc3_drm-intel-nightly_6cf0ff_20150514+ #230
[  256.350958] Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.86C.B067.R00.1412310711 12/31/2014
[  256.350962]  0000000000000000 0000000000000009 ffffffff817a67ac ffff880092e1f908
[  256.350973]  ffffffff8103ebde ffff880092e1f900 ffffffffa00d1924 ffff880004d40000
[  256.350981]  ffff8801491c7000 ffff880004e20000 ffff880092e1f990 ffff880094879c00
[  256.350988] Call Trace:
[  256.351002]  [<ffffffff817a67ac>] ? dump_stack+0x40/0x50
[  256.351011]  [<ffffffff8103ebde>] ? warn_slowpath_common+0x98/0xb0
[  256.351055]  [<ffffffffa00d1924>] ? check_crtc_state+0xb67/0xbd1 [i915]
[  256.351071]  [<ffffffff8103ec3b>] ? warn_slowpath_fmt+0x45/0x4a
[  256.351123]  [<ffffffffa00d1924>] ? check_crtc_state+0xb67/0xbd1 [i915]
[  256.351198]  [<ffffffffa00e0a65>] ? intel_modeset_check_state+0x4f6/0x87a [i915]
[  256.351244]  [<ffffffffa00dac4f>] ? intel_post_enable_primary+0x53/0x94 [i915]
[  256.351274]  [<ffffffffa0016ce0>] ? drm_mode_obj_set_property_ioctl+0xf0/0x193 [drm]
[  256.351299]  [<ffffffffa0016daf>] ? drm_mode_connector_property_set_ioctl+0x2c/0x31 [drm]
[  256.351321]  [<ffffffffa000a636>] ? drm_ioctl+0x322/0x38d [drm]
[  256.351343]  [<ffffffffa0016d83>] ? drm_mode_obj_set_property_ioctl+0x193/0x193 [drm]
[  256.351353]  [<ffffffff81123546>] ? do_vfs_ioctl+0x360/0x424
[  256.351359]  [<ffffffff81116053>] ? __fput+0x184/0x19a
[  256.351364]  [<ffffffff81123653>] ? SyS_ioctl+0x49/0x7a
[  256.351371]  [<ffffffff817ac317>] ? system_call_fastpath+0x12/0x6a
[  256.351376] ---[ end trace bac1956cadeda82e ]---

==Reproduce steps==
---------------------------- 
1. ./kms_flip --run-subtest blt-flip-vs-dpms
Comment 1 lu hua 2015-05-15 05:25:53 UTC
kms_cursor_crc also has this error.
Comment 2 lu hua 2015-05-15 05:35:13 UTC
kms_plane and kms_psr_sink_crc also have this error.
More than 100 cases have this error.
Comment 3 lu hua 2015-05-15 05:37:07 UTC
pm_rpm also has this error.
Comment 4 Ander Conselvan de Oliveira 2015-05-15 10:30:18 UTC
Created attachment 115798 [details] [review]
Possible fix

Could you test if the attached patch fixes the issue?
Comment 5 lu hua 2015-05-18 07:20:58 UTC
(In reply to Ander Conselvan de Oliveira from comment #4)
> Created attachment 115798 [details] [review] [review]
> Possible fix
> 
> Could you test if the attached patch fixes the issue?

Apply this patch,  build fail.
CC [M]  drivers/infiniband/hw/ipath/ipath_wc_x86_64.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_main.o
  CC [M]  drivers/infiniband/ulp/iser/iser_verbs.o
  CC [M]  drivers/infiniband/ulp/iser/iser_initiator.o
  CC [M]  drivers/infiniband/ulp/iser/iser_memory.o
  LD [M]  drivers/infiniband/hw/nes/iw_nes.o
  CC [M]  drivers/infiniband/ulp/iser/iscsi_iser.o
  LD [M]  drivers/infiniband/hw/ipath/ib_ipath.o
  CC [M]  drivers/infiniband/ulp/srp/ib_srp.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_ib.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_multicast.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_verbs.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_vlan.o
  LD [M]  drivers/infiniband/ulp/iser/ib_iser.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_ethtool.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_netlink.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_cm.o
  CC [M]  drivers/infiniband/ulp/ipoib/ipoib_fs.o
  LD [M]  drivers/infiniband/ulp/ipoib/ib_ipoib.o
make: *** [drivers] Error 2
Comment 6 Ander Conselvan de Oliveira 2015-05-18 07:33:54 UTC
The last few line preceeding the "make: *** [drivers] Error 2" line are for a different make subprocess that didn't fail. After the compile failure, run make again with -j1 and then paste error again.
Comment 7 lu hua 2015-05-18 07:46:18 UTC
#make -j1 modules 
 CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  LD [M]  drivers/gpu/drm/drm_kms_helper.o
  LD [M]  drivers/gpu/drm/drm.o
  CC [M]  drivers/gpu/drm/i915/intel_dp.o
drivers/gpu/drm/i915/intel_dp.c:1924:9: error: expected declaration specifiers or ‘...’ before ‘&’ token
  memset(&pipe_config->dpll_hw_state, 0,
         ^
drivers/gpu/drm/i915/intel_dp.c:1924:38: error: expected declaration specifiers or ‘...’ before numeric constant
  memset(&pipe_config->dpll_hw_state, 0,
                                      ^
drivers/gpu/drm/i915/intel_dp.c:1925:9: error: expected declaration specifiers or ‘...’ before ‘sizeof’
         sizeof(pipe_config->dpll_hw_state));
         ^
make[4]: *** [drivers/gpu/drm/i915/intel_dp.o] Error 1
make[3]: *** [drivers/gpu/drm/i915] Error 2
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
Comment 8 Ander Conselvan de Oliveira 2015-05-18 07:54:15 UTC
This looks really odd. Can you attach the file drivers/gpu/drm/i915/intel_dp.c you get after applying the patch?
Comment 9 Ander Conselvan de Oliveira 2015-05-18 08:12:41 UTC
In any case, the patch is now in nightly, so please try that.

commit d971d68ab45fb21866afa264ed5881e789b7e191
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Fri May 15 13:34:29 2015 +0300

    drm/i915: Don't overwrite (e)DP PLL selection on SKL
Comment 10 ye.tian 2015-05-19 04:12:12 UTC
Test it on the latest nightly kernel, this problem does not exists.
So verified.
Comment 11 Jari Tahvanainen 2017-01-10 17:29:59 UTC
Closing verified+fixed.


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.