Bug 90410 - [HSW/BDW/SKL HDMI] System boot up causes [drm:check_crtc_state [i915]] *ERROR* mismatch in ddi_pll_sel (expected 0x00000000, found 0x80000000)
Summary: [HSW/BDW/SKL HDMI] System boot up causes [drm:check_crtc_state [i915]] *ERROR...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Ander Conselvan de Oliveira
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-12 07:32 UTC by ye.tian
Modified: 2017-10-06 14:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg info (123.58 KB, text/plain)
2015-05-12 07:32 UTC, ye.tian
no flags Details
Possible fix (1.86 KB, patch)
2015-05-13 07:13 UTC, Ander Conselvan de Oliveira
no flags Details | Splinter Review
dmesg info (123.60 KB, text/plain)
2015-05-13 08:52 UTC, ye.tian
no flags Details
dmesg info with drm.debug=0x1e log_buf_len=16M (352.62 KB, text/plain)
2015-05-14 00:45 UTC, ye.tian
no flags Details

Description ye.tian 2015-05-12 07:32:45 UTC
Created attachment 115708 [details]
dmesg info

System Environment:       
-----------------------------------------------------
Regression:  not sure
Non-working platforms: BDW-H

==Kernel==
--------------------------------------------------
commit 7dcedb8e7bbf49f1342df21851d9b36786ff67ce
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon May 11 18:51:58 2015 +0200

drm-intel-nightly: 2015y-05m-11d-16h-51m-26s UTC integration manifest==Bug detailed 
==description==
System boot up causes [drm:check_crtc_state [i915]] *ERROR* mismatch in ddi_pll_sel (expected 0x00000000, found 0x80000000) on BDW-H with the latest nightly kernel, it also exists on drm-intel-testing-2015-05-08, it does not exists on latest fixes branch.

==Output==

[    8.663193] [drm:check_crtc_state [i915]] *ERROR* mismatch in ddi_pll_sel (expected 0x00000000, found 0x80000000)
[    8.663194] ------------[ cut here ]------------
[    8.663202] WARNING: CPU: 0 PID: 946 at drivers/gpu/drm/i915/intel_display.c:12074 check_crtc_state+0xb67/0xbd1 [i915]()
[    8.663203] pipe state doesn't match!
[    8.663223] Modules linked in: dm_mod iTCO_wdt iTCO_vendor_support ppdev snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi pcspkr i2c_i801 joydev lpc_ich snd_hda_intel mfd_core snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore battery parport_pc parport ac acpi_cpufreq i915 button video drm_kms_helper drm
[    8.663224] CPU: 0 PID: 946 Comm: kworker/0:1 Tainted: G        W       4.1.0-rc2_drm-intel-testing-2015-05-08+ #2
[    8.663225] Hardware name: Intel Corporation Broadwell Client platform/Basking Ridge, BIOS BDW-E1R1.86C.0119.R01.1503252201 03/25/2015
[    8.663227] Workqueue: events console_callback
[    8.663228]  0000000000000000 0000000000000009 ffffffff817a66cc ffff88044bfc3778
[    8.663229]  ffffffff8103ebde ffff88044bfc3770 ffffffffa00ca3b0 ffff880446e00000
[    8.663230]  ffff880446c9f000 ffff8804472a4800 ffff88044bfc3800 ffff880445e48400
[    8.663231] Call Trace:
[    8.663232]  [<ffffffff817a66cc>] ? dump_stack+0x40/0x50
[    8.663233]  [<ffffffff8103ebde>] ? warn_slowpath_common+0x98/0xb0
[    8.663241]  [<ffffffffa00ca3b0>] ? check_crtc_state+0xb67/0xbd1 [i915]
[    8.663242]  [<ffffffff8103ec3b>] ? warn_slowpath_fmt+0x45/0x4a
[    8.663249]  [<ffffffffa00ca3b0>] ? check_crtc_state+0xb67/0xbd1 [i915]
[    8.663260]  [<ffffffffa00d959d>] ? intel_modeset_check_state+0x610/0x9e9 [i915]
[    8.663268]  [<ffffffffa00d9db8>] ? intel_crtc_set_config+0x3f8/0x531 [i915]
[    8.663272]  [<ffffffffa0018584>] ? drm_modeset_lock_all_crtcs+0x69/0x81 [drm]
[    8.663278]  [<ffffffffa000c2be>] ? drm_mode_set_config_internal+0x4e/0xd2 [drm]
[    8.663280]  [<ffffffffa0059613>] ? drm_fb_helper_pan_display+0x81/0xb6 [drm_kms_helper]
[    8.663283]  [<ffffffff81385fcd>] ? fb_pan_display+0xcb/0x10b
[    8.663284]  [<ffffffff813819d7>] ? bit_update_start+0x16/0x32
[    8.663286]  [<ffffffff8137fc87>] ? fbcon_switch+0x421/0x438
[    8.663287]  [<ffffffff813d4f18>] ? redraw_screen+0x106/0x1db
[    8.663289]  [<ffffffff813ce117>] ? complete_change_console+0x32/0xb6
[    8.663290]  [<ffffffff813d69a3>] ? console_callback+0x4b/0xed
[    8.663291]  [<ffffffff8104f985>] ? process_one_work+0x1b2/0x31d
[    8.663292]  [<ffffffff8105026f>] ? worker_thread+0x265/0x351
[    8.663294]  [<ffffffff8105000a>] ? cancel_delayed_work_sync+0xa/0xa
[    8.663295]  [<ffffffff81053ee1>] ? kthread+0xce/0xd6
[    8.663296]  [<ffffffff81053e13>] ? kthread_create_on_node+0x162/0x162
[    8.663298]  [<ffffffff817ac5d2>] ? ret_from_fork+0x42/0x70
[    8.663300]  [<ffffffff81053e13>] ? kthread_create_on_node+0x162/0x162
[    8.663301] ---[ end trace 3824646499370b63 ]---


Reproduce steps:
----------------------------

1, start machine
Comment 1 Ander Conselvan de Oliveira 2015-05-12 11:40:56 UTC
The dmesg is truncated. Also, please test with an older kernel to determine if this is a regression.
Comment 2 ye.tian 2015-05-13 02:44:45 UTC
By bisected, shows the first bad commit is a821fc4.

commit a821fc46bc7bb6d4cf9a5f8d2787fd70231c2c10
Author:     Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
AuthorDate: Tue Apr 21 17:13:23 2015 +0300
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Fri May 8 13:04:10 2015 +0200

    drm/i915: Swap atomic state in legacy modeset

    Replace the commit output state function with a simple swap of states.
    Note that we still need to reconcile the legacy state after the swap,
    since there are still code that relies on those.

    Also note that even though changes to the state of a crtc different than
    the one passed as an argument to __intel_set_mode() will be saved, the
    modeset logic still deals with only one crtc.

    Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
    Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 3 ye.tian 2015-05-13 06:49:50 UTC
This problem does not exist on BDW-U.
There is other problem on BDW-U. bug 90398
[BDW Regression]ARNING: CPU: 0 PID: 1215 at drivers/gpu/drm/drm_irq.c:1159 drm_wait_one_vblank+0x3b/0x16d [drm] while clean boot system
Comment 4 Ander Conselvan de Oliveira 2015-05-13 07:13:52 UTC
Created attachment 115732 [details] [review]
Possible fix

Could you test with the attached patch?
Comment 5 ye.tian 2015-05-13 07:37:21 UTC
(In reply to Ander Conselvan de Oliveira from comment #4)
> Created attachment 115732 [details] [review] [review]
> Possible fix
> 
> Could you test with the attached patch?

Test with this patch, it does not exist.

BTW, There is "Call Trace" on the latest nightly kernel with this patch, same as the bug 90398.
Comment 6 Ander Conselvan de Oliveira 2015-05-13 08:41:37 UTC
I'm still a bit puzzled as to why ddi_pll_sel is not being set in the first place, given that we are calculating a new pipe_config.

Could you upload a dmesg that is not truncated with drm.debug=0x1e in the kernel command line.
Comment 7 ye.tian 2015-05-13 08:52:52 UTC
Created attachment 115735 [details]
dmesg info
Comment 8 Ander Conselvan de Oliveira 2015-05-13 09:00:41 UTC
This is still truncated. Note that the first timestamp is 8.559486, but that should start form zero. You might need to add log_buf_len=16M to the kernel command line.
Comment 9 ye.tian 2015-05-14 00:45:49 UTC
Created attachment 115757 [details]
dmesg info with drm.debug=0x1e log_buf_len=16M
Comment 10 Ander Conselvan de Oliveira 2015-05-15 08:54:16 UTC
(In reply to Ander Conselvan de Oliveira from comment #4)
> Created attachment 115732 [details] [review] [review]
> Possible fix

So this is indeed the right fix. I sent it to mailing list for review.

http://lists.freedesktop.org/archives/intel-gfx/2015-May/066726.html
Comment 11 ye.tian 2015-05-18 07:29:48 UTC
(In reply to Ander Conselvan de Oliveira from comment #10)
> (In reply to Ander Conselvan de Oliveira from comment #4)
> > Created attachment 115732 [details] [review] [review] [review]
> > Possible fix
> 
> So this is indeed the right fix. I sent it to mailing list for review.
> 
> http://lists.freedesktop.org/archives/intel-gfx/2015-May/066726.html

Test it on the latest nightly kernel with this patch, It does not exist on skl, but there are other error in dmesg.

output:
---------------------

[    3.283878] [drm:check_crtc_state [i915]] *ERROR* mismatch in dpll_hw_state.ctrl1 (expected 0x00000000, found 0x00000001)
[    3.283880] ------------[ cut here ]------------
[    3.283964] WARNING: CPU: 0 PID: 1291 at drivers/gpu/drm/i915/intel_display.c:12097 check_crtc_state+0xb67/0xbd1 [i915]()
[    3.283965] pipe state doesn't match!
[    3.283972] Modules linked in: i915 button video drm_kms_helper drm
[    3.283978] CPU: 0 PID: 1291 Comm: kworker/u16:2 Not tainted 4.1.0-rc3_kcloud_bb412d_20150518+ #10
[    3.283979] Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.R00.B082.B00.1504240146 04/24/2015
[    3.283988] Workqueue: events_unbound async_run_entry_fn
[    3.283994]  0000000000000000 0000000000000009 ffffffff817a67ac ffff880163a2f638
[    3.283997]  ffffffff8103ebde ffff880163a2f630 ffffffffa00cb932 ffff880163620000
[    3.284000]  ffff8801689b7000 ffff8801689be000 ffff880163a2f6c0 ffff880168486800
[    3.284001] Call Trace:
[    3.284011]  [<ffffffff817a67ac>] ? dump_stack+0x40/0x50
[    3.284015]  [<ffffffff8103ebde>] ? warn_slowpath_common+0x98/0xb0
[    3.284088]  [<ffffffffa00cb932>] ? check_crtc_state+0xb67/0xbd1 [i915]
[    3.284093]  [<ffffffff8103ec3b>] ? warn_slowpath_fmt+0x45/0x4a
[    3.284159]  [<ffffffffa00cb932>] ? check_crtc_state+0xb67/0xbd1 [i915]
[    3.284243]  [<ffffffffa00daa73>] ? intel_modeset_check_state+0x4f6/0x87a [i915]
[    3.284316]  [<ffffffffa00d5f46>] ? __intel_set_mode+0x936/0x94d [i915]
[    3.284387]  [<ffffffffa00db245>] ? intel_crtc_set_config+0x404/0x53d [i915]
[    3.284402]  [<ffffffffa001825f>] ? drm_modeset_lock+0x4e/0xa3 [drm]
[    3.284422]  [<ffffffffa000c326>] ? drm_mode_set_config_internal+0x4e/0xd2 [drm]
[    3.284429]  [<ffffffffa005afed>] ? restore_fbdev_mode+0xac/0xc3 [drm_kms_helper]
[    3.284436]  [<ffffffffa005c7ee>] ? drm_fb_helper_restore_fbdev_mode_unlocked+0x1e/0x54 [drm_kms_helper]
[    3.284442]  [<ffffffffa005c852>] ? drm_fb_helper_set_par+0x2e/0x32 [drm_kms_helper]
[    3.284525]  [<ffffffffa00e7a8b>] ? intel_fbdev_set_par+0x11/0x55 [i915]
[    3.284531]  [<ffffffff8137e96e>] ? fbcon_init+0x2fd/0x406
[    3.284537]  [<ffffffff813d43df>] ? visual_init+0xaf/0x102
[    3.284540]  [<ffffffff813d5931>] ? do_bind_con_driver+0x19e/0x2c2
[    3.284544]  [<ffffffff813d5d09>] ? do_take_over_console+0x12c/0x15c
[    3.284549]  [<ffffffff8137e05d>] ? do_fbcon_takeover+0x53/0x97
[    3.284555]  [<ffffffff810549dc>] ? notifier_call_chain+0x35/0x59
[    3.284560]  [<ffffffff81054c23>] ? __blocking_notifier_call_chain+0x43/0x5b
[    3.284566]  [<ffffffff813860eb>] ? lock_fb_info+0x12/0x2f
[    3.284571]  [<ffffffff81387906>] ? register_framebuffer+0x26c/0x2a2
[    3.284578]  [<ffffffffa005cb03>] ? drm_fb_helper_initial_config+0x2ad/0x34a [drm_kms_helper]
[    3.284581]  [<ffffffff81055b8f>] ? async_run_entry_fn+0x2d/0xbf
[    3.284585]  [<ffffffff8104f985>] ? process_one_work+0x1b2/0x31d
[    3.284589]  [<ffffffff8105026f>] ? worker_thread+0x265/0x351
[    3.284592]  [<ffffffff8105000a>] ? cancel_delayed_work_sync+0xa/0xa
[    3.284597]  [<ffffffff81053ee1>] ? kthread+0xce/0xd6
[    3.284602]  [<ffffffff81053e13>] ? kthread_create_on_node+0x162/0x162
[    3.284606]  [<ffffffff817ac6d2>] ? ret_from_fork+0x42/0x70
[    3.284610]  [<ffffffff81053e13>] ? kthread_create_on_node+0x162/0x162
[    3.284613] ---[ end trace c0e7c973a94133fe ]---
Comment 12 Ander Conselvan de Oliveira 2015-05-18 07:38:03 UTC
(In reply to ye.tian from comment #11)
> (In reply to Ander Conselvan de Oliveira from comment #10)
> > (In reply to Ander Conselvan de Oliveira from comment #4)
> > > Created attachment 115732 [details] [review] [review] [review] [review]
> > > Possible fix
> > 
> > So this is indeed the right fix. I sent it to mailing list for review.
> > 
> > http://lists.freedesktop.org/archives/intel-gfx/2015-May/066726.html
> 
> Test it on the latest nightly kernel with this patch, It does not exist on
> skl, but there are other error in dmesg.

That's bug #90462. That one seems to happen with DP while this one happens with HDMI.
Comment 13 Ander Conselvan de Oliveira 2015-05-20 07:33:26 UTC
Fixed by

commit 8e280341b3e0f1b866912e694ecb2097dc9b6a76
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Fri May 15 11:51:50 2015 +0300

    drm/i915: Preserve ddi_pll_sel when allocating new pipe_config

in -nightly.
Comment 14 ye.tian 2015-05-22 02:36:10 UTC
Test it on the latest nightly kernel(790a30), this problem doest not exists.
So verified.
Comment 15 Elizabeth 2017-10-06 14:30:02 UTC
Closing old verified.


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.