Summary: | [SKL] State checker doesn't handle modes with DRM_MODE_FLAG_DBLCLK properly | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | liulei <lei.a.liu> | ||||||||||||
Component: | DRM/Intel | Assignee: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||||||||
Status: | CLOSED FIXED | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||||||||
Severity: | critical | ||||||||||||||
Priority: | highest | CC: | christophe.prigent, gary.c.wang, guillaume-florianx.vidal, intel-gfx-bugs, james.ausmus, scorp | ||||||||||||
Version: | unspecified | ||||||||||||||
Hardware: | Other | ||||||||||||||
OS: | Linux (All) | ||||||||||||||
Whiteboard: | |||||||||||||||
i915 platform: | SKL | i915 features: | display/HDMI | ||||||||||||
Attachments: |
|
Would be useful to include this: [ 234.323987] [drm:check_crtc_state [i915]] *ERROR* mismatch in base.adjusted_mode.crtc_clock (expected 13500, found 27000) Tested on SKLY03 with the testing kernel drm-intel-testing-2015-05-08. this problem still exists. Dmesg: [ 2604.315080] Call Trace: [ 2604.315091] [<ffffffff817a66cc>] ? dump_stack+0x40/0x50 [ 2604.315096] [<ffffffff8103ebde>] ? warn_slowpath_common+0x98/0xb0 [ 2604.315125] [<ffffffffa00ca3b0>] ? check_crtc_state+0xb67/0xbd1 [i915] [ 2604.315129] [<ffffffff8103ec3b>] ? warn_slowpath_fmt+0x45/0x4a [ 2604.315157] [<ffffffffa00ca3b0>] ? check_crtc_state+0xb67/0xbd1 [i915] [ 2604.315195] [<ffffffffa00d959d>] ? intel_modeset_check_state+0x610/0x9e9 [i915] [ 2604.315226] [<ffffffffa00d9db8>] ? intel_crtc_set_config+0x3f8/0x531 [i915] [ 2604.315241] [<ffffffffa0018203>] ? drm_modeset_lock+0x4e/0xa3 [drm] [ 2604.315261] [<ffffffffa000c2be>] ? drm_mode_set_config_internal+0x4e/0xd2 [drm] [ 2604.315270] [<ffffffffa0058fc5>] ? restore_fbdev_mode+0xac/0xc3 [drm_kms_helper] [ 2604.315277] [<ffffffffa005a7c6>] ? drm_fb_helper_restore_fbdev_mode_unlocked+0x1e/0x54 [drm_kms_helper] [ 2604.315284] [<ffffffffa005a82a>] ? drm_fb_helper_set_par+0x2e/0x32 [drm_kms_helper] [ 2604.315314] [<ffffffffa00e65e7>] ? intel_fbdev_set_par+0x11/0x55 [i915] [ 2604.315321] [<ffffffff81344e3d>] ? number.isra.13+0x11f/0x215 [ 2604.315328] [<ffffffff81386585>] ? fb_set_var+0x250/0x33b [ 2604.315332] [<ffffffff810e93e4>] ? shmem_undo_range+0x455/0x46b [ 2604.315337] [<ffffffff81345aaa>] ? vsnprintf+0x83/0x3b9 [ 2604.315343] [<ffffffff8137f131>] ? fbcon_blank+0x75/0x228 [ 2604.315347] [<ffffffff810df8f8>] ? file_ra_state_init+0xc/0x1d [ 2604.315353] [<ffffffff813d5f89>] ? do_unblank_screen+0xef/0x168 [ 2604.315358] [<ffffffff813ce679>] ? vt_ioctl+0x4de/0xf59 [ 2604.315364] [<ffffffff813c5cf8>] ? tty_ioctl+0x954/0x9ba [ 2604.315368] [<ffffffff811217ff>] ? do_filp_open+0x2b/0x6f [ 2604.315372] [<ffffffff81123502>] ? do_vfs_ioctl+0x360/0x424 [ 2604.315376] [<ffffffff8112ae24>] ? __fd_install+0x15/0x40 [ 2604.315380] [<ffffffff8112360f>] ? SyS_ioctl+0x49/0x7a [ 2604.315384] [<ffffffff817ac217>] ? system_call_fastpath+0x12/0x6a [ 2604.315387] ---[ end trace 8103221c8aae6c4b ]--- Created attachment 116866 [details]
dmesg_s4_calltrace.log
Test on SKL Mobile with eywa-4.1-2015-06-22 reproduce steps: 1. boot up system with eywa-4.1-2015-06-22 2. echo 7 > /proc/sys/kernel/printk 3. echo disk > /sys/power/state 4. wait for a while observed call trace in dmesg. [ 4246.629377] ------------[ cut here ]------------ [ 4246.629390] WARNING: CPU: 0 PID: 1452 at drivers/gpu/drm/i915/intel_display.c:12791 check_crtc_state+0x821/0xfb0 [i915]() [ 4246.629390] pipe state doesn't match! [ 4246.629404] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic hid_generic asix usbnet mii usbhid xhci_plat_hcd i915 drm_kms_helper drm i2c_algo_bit snd_hda_intel dwc3 udc_core 8250_dw i2c_designware_platform i2c_designware_core snd_hda_codec snd_hda_core snd_hwdep intel_rapl iosf_mbi snd_pcm x86_pkg_temp_thermal coretemp kvm_intel snd_seq_midi snd_seq_midi_event kvm snd_rawmidi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_seq aesni_intel aes_x86_64 snd_seq_device lrw gf128mul glue_helper ablk_helper iwlwifi cryptd snd_timer snd cfg80211 psmouse serio_raw soundcore rfcomm idma64 mei_me virt_dma bnep bluetooth xhci_pci mei xhci_hcd dwc3_pci intel_lpss_pci wmi i2c_hid hid i2c_core winbond_cir rc_core video pinctrl_sunrisepoint pinctrl_intel spidev intel_lpss_acpi intel_lpss parport_pc acpi_pad ppdev mac_hid lp nls_iso8859_1 parport e1000e sdhci_pci ptp sdhci mmc_core pps_core ahci libahci [ 4246.629409] CPU: 0 PID: 1452 Comm: kworker/0:0 Tainted: G W 4.1.0-eywa-4.1-2015-06-22-mod+ #12 [ 4246.629409] Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.R00.B088.B00.1506091425 06/09/2015 [ 4246.629411] Workqueue: events console_callback [ 4246.629412] ffffffffa0755f18 ffff88016a84f568 ffffffff8175fd99 000000005e8e5e8e [ 4246.629413] ffff88016a84f5b8 ffff88016a84f5a8 ffffffff810780fa ffff88016a84f5b0 [ 4246.629414] ffff880080bc7400 ffff88016ac37000 ffff880036b12000 0000000000000001 [ 4246.629414] Call Trace: [ 4246.629416] [<ffffffff8175fd99>] dump_stack+0x45/0x57 [ 4246.629418] [<ffffffff810780fa>] warn_slowpath_common+0x8a/0xc0 [ 4246.629419] [<ffffffff81078176>] warn_slowpath_fmt+0x46/0x50 [ 4246.629431] [<ffffffffa06a2e91>] check_crtc_state+0x821/0xfb0 [i915] [ 4246.629446] [<ffffffffa06cba89>] intel_modeset_check_state+0x2c9/0xb80 [i915] [ 4246.629458] [<ffffffffa06c2264>] ? __intel_set_mode+0x4f4/0x870 [i915] [ 4246.629470] [<ffffffffa06c307b>] ? intel_modeset_compute_config+0xcb/0xf00 [i915] [ 4246.629483] [<ffffffffa06cc74a>] intel_crtc_set_config+0x40a/0x5a0 [i915] [ 4246.629494] [<ffffffffa059114f>] drm_mode_set_config_internal+0x6f/0x110 [drm] [ 4246.629499] [<ffffffffa0607e60>] drm_fb_helper_pan_display+0xa0/0xf0 [drm_kms_helper] [ 4246.629512] [<ffffffffa06e5a4a>] intel_fbdev_pan_display+0x1a/0x60 [i915] [ 4246.629513] [<ffffffff81418903>] ? bit_cursor+0x633/0x670 [ 4246.629515] [<ffffffff8141de21>] fb_pan_display+0xd1/0x1a0 [ 4246.629516] [<ffffffff81418110>] bit_update_start+0x20/0x50 [ 4246.629517] [<ffffffff81416932>] fbcon_switch+0x3a2/0x550 [ 4246.629519] [<ffffffff814ab759>] redraw_screen+0x189/0x240 [ 4246.629520] [<ffffffff8141508a>] fbcon_blank+0x20a/0x2d0 [ 4246.629522] [<ffffffff814c7cf3>] ? _xfer_secondary_pool+0xb3/0x170 [ 4246.629523] [<ffffffff810b04f2>] ? dequeue_entity+0x152/0x6c0 [ 4246.629524] [<ffffffff810e226e>] ? internal_add_timer+0x8e/0xb0 [ 4246.629526] [<ffffffff810e444a>] ? mod_timer+0x12a/0x1e0 [ 4246.629528] [<ffffffff814ac2c8>] do_unblank_screen+0xb8/0x1f0 [ 4246.629529] [<ffffffff814ad66f>] poke_blanked_console+0xcf/0xe0 [ 4246.629529] [<ffffffff814ad7bf>] console_callback+0x13f/0x160 [ 4246.629531] [<ffffffff81763057>] ? __schedule+0x357/0x960 [ 4246.629532] [<ffffffff810918cf>] process_one_work+0x14f/0x420 [ 4246.629533] [<ffffffff81092088>] worker_thread+0x118/0x530 [ 4246.629535] [<ffffffff81091f70>] ? rescuer_thread+0x3d0/0x3d0 [ 4246.629536] [<ffffffff81097612>] kthread+0xd2/0xf0 [ 4246.629538] [<ffffffff81097540>] ? kthread_create_on_node+0x180/0x180 [ 4246.629540] [<ffffffff81767d62>] ret_from_fork+0x42/0x70 [ 4246.629541] [<ffffffff81097540>] ? kthread_create_on_node+0x180/0x180 [ 4246.629542] ---[ end trace 2aaa9aff1abb737e ]--- dmesg_s4_calltrace.log attached. The error in the first log, *ERROR* mismatch in base.adjusted_mode.crtc_clock (expected 13500, found 27000) happens when using a mode with DRM_MODE_FLAG_DBLCLK. Because of that flag, intel_hdmi_compute_config() sets the pipe_config's pixel_multiplier to 2, which in turns causes intel_modeset_pipe_config() to double the port clock. When we read back the hardware configuration for state checking, ->get_pipe_config() reads the port clock as doubled (27000 instead of 13500) and sets adjusted_mode.crtc_clock to be equal to the port_clock. In the second log, the mismatch happens with SKL scalers, so they should be tracked in a separate bug if they still occur. Ville fixed this in the following commit: commit 398a017e91d1518e303886398b15b1851c3d902c Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Tue Jun 30 15:33:51 2015 +0300 drm/i915: Fix HDMI 12bpc and pixel repeat clock readout for DDI platforms Please open a separate bug report for the *ERROR* mismatch in scaler_state.scaler_id (expected 0, found -1) warnings. Created attachment 117541 [details]
log of testdisplay
Created attachment 117542 [details]
log-testdisplay
Tested on SKL:
Hardware
Platform: SKY LAKE Y A0
CPU : Intel(R) Core(TM) m3-6Y30 CPU @ 0.8GHz 4MB (family: 6, model: 78 stepping: 3)
MCP : SKL-Y D1 2+2 (or ULX-D1)
QDF : QVY3
CPU : SKL D1
Chipset PCH: Sunrise Point LP C1
CRB : SKY LAKE Y LPDDR3 RVP3 CRB FAB2
Reworks : All Mandatories + FBS02 & FBS03, O-06
Software
Kernel : drm-intel-nightly 7ac3d6977b359242ecabc0b155edf63cf5404913 4.2.0-rc4 from git://anongit.freedesktop.org/drm-intel
Bios: SKLSE2R1.R00.X093.1507222151
ME FW : 11.0.0.1165
Ksc (EC FW): 1.16
drm: (HEAD, origin/master, origin/HEAD, master) fc083322b0c8a58b51976adf23a582bce8bb75f1 from git://git.freedesktop.org/git/mesa/drm
intel-driver: (HEAD, origin/master, origin/HEAD, master) 611d8ea9d75dc026c203e3ebe53b434769d4587c from git://git.freedesktop.org/git/vaapi/intel-driver
libva: (HEAD, origin/master, origin/HEAD, master) 70b80c0dd2effb4956b208775641f7c68a67a9df from git://git.freedesktop.org/git/vaapi/libva
mesa: (HEAD, origin/master, origin/HEAD, master) 1b2b0e42ce47bfd1fcb5513ed2c23b9bb7a5a5b8 from git://git.freedesktop.org/git/mesa/mesa
xf86-video-intel: (HEAD, origin/master, origin/HEAD, master) 4246c63347290390a2104739c719f5ff6a05a0e2 from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
xserver: (HEAD, origin/master, origin/HEAD, master) ea03e314f98e5d8ed7bf7a508006a3d84014bde5 from git://git.freedesktop.org/git/xorg/xserver
Created attachment 117556 [details]
log suspend to disck
Tested for two methods (test_display, suspend to disck) with the last setup
See logs attached
Logs from Rami contains: [ 415.734060] ------------[ cut here ]------------ [ 415.734093] WARNING: CPU: 0 PID: 2912 at drivers/gpu/drm/i915/intel_pm.c:3666 skl_update_other_pipe_wm+0x12e/0x16e [i915]() [ 415.734096] WARN_ON(!wm_changed) [ 415.734157] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm_oss snd_mixer_oss x86_pkg_temp_thermal snd_pcm coretemp kvm_intel snd_seq_dummy kvm snd_seq_oss microcode snd_seq_midi asix usbnet serio_raw joydev input_leds snd_rawmidi snd_seq_midi_event snd_seq snd_seq_device snd_timer snd i915 soundcore drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm shpchp wmi ipv6 bnep rfcomm bluetooth battery rfkill video ac parport_pc button acpi_cpufreq ppdev lp parport sdhci_pci sdhci led_class mmc_core [ 415.734162] CPU: 0 PID: 2912 Comm: testdisplay Tainted: G W 4.2.0-rc4-drm-intel-nightly-ww32+ #1 [ 415.734164] Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.R00.X093.B02.1507222151 07/22/2015 [ 415.734171] 0000000000000009 ffff88016adb73c8 ffffffff81896b51 0000000000000000 [ 415.734175] ffff88016adb7418 ffff88016adb7408 ffffffff810467c3 ffff88016adb75e5 [ 415.734179] ffffffffa0315e0e ffff88016cb2d000 ffff880086ff4000 ffff88016cb2c000 [ 415.734180] Call Trace: [ 415.734190] [<ffffffff81896b51>] dump_stack+0x45/0x57 [ 415.734196] [<ffffffff810467c3>] warn_slowpath_common+0xa1/0xbb [ 415.734226] [<ffffffffa0315e0e>] ? skl_update_other_pipe_wm+0x12e/0x16e [i915] [ 415.734230] [<ffffffff81046823>] warn_slowpath_fmt+0x46/0x48 [ 415.734259] [<ffffffffa0315e0e>] skl_update_other_pipe_wm+0x12e/0x16e [i915] [ 415.734289] [<ffffffffa0315fa2>] skl_update_wm+0x154/0x6d1 [i915] [ 415.734295] [<ffffffff81086adf>] ? mark_held_locks+0x58/0x6e [ 415.734300] [<ffffffff8189f621>] ? retint_kernel+0x10/0x10 [ 415.734331] [<ffffffffa03172a8>] intel_update_watermarks+0x1e/0x20 [i915] [ 415.734381] [<ffffffffa036890d>] haswell_crtc_enable+0x5c9/0xaaa [i915] [ 415.734426] [<ffffffffa036d595>] intel_atomic_commit+0x411/0x5cd [i915] [ 415.734460] [<ffffffffa027699c>] drm_atomic_commit+0x4d/0x52 [drm] [ 415.734474] [<ffffffffa02e39f2>] drm_atomic_helper_set_config+0x316/0x371 [drm_kms_helper] [ 415.734486] [<ffffffffa02e3b64>] ? drm_atomic_helper_plane_set_property+0x6c/0xab [drm_kms_helper] [ 415.734511] [<ffffffffa02682e0>] drm_mode_set_config_internal+0x5c/0xf7 [drm] [ 415.734523] [<ffffffffa02e5408>] restore_fbdev_mode+0xbb/0xd5 [drm_kms_helper] [ 415.734535] [<ffffffffa02e6a3e>] drm_fb_helper_restore_fbdev_mode_unlocked+0x27/0x5e [drm_kms_helper] [ 415.734545] [<ffffffffa02e6ab4>] drm_fb_helper_set_par+0x3f/0x4b [drm_kms_helper] [ 415.734590] [<ffffffffa037a203>] intel_fbdev_set_par+0x1a/0x5c [i915] [ 415.734597] [<ffffffff8141cc03>] fb_set_var+0x2aa/0x3a0 [ 415.734603] [<ffffffff81414d61>] fbcon_blank+0x89/0x251 [ 415.734609] [<ffffffff81086adf>] ? mark_held_locks+0x58/0x6e [ 415.734615] [<ffffffff814741ed>] do_unblank_screen+0xfa/0x173 [ 415.734620] [<ffffffff8146bd3b>] vt_ioctl+0x546/0x10f3 [ 415.734625] [<ffffffff814615ae>] tty_ioctl+0xbe7/0xc63 [ 415.734630] [<ffffffff81172896>] ? __fd_install+0x19a/0x1bf [ 415.734634] [<ffffffff8114fe6a>] ? kmem_cache_free+0xeb/0x1ba [ 415.734637] [<ffffffff81164fae>] ? putname+0x4a/0x4e [ 415.734642] [<ffffffff81086c63>] ? trace_hardirqs_on_caller+0x16e/0x18a [ 415.734646] [<ffffffff811681e8>] do_vfs_ioctl+0x41c/0x4e7 [ 415.734649] [<ffffffff81164fae>] ? putname+0x4a/0x4e [ 415.734652] [<ffffffff811720c9>] ? __fget_light+0x50/0x75 [ 415.734655] [<ffffffff81168306>] SyS_ioctl+0x53/0x81 [ 415.734660] [<ffffffff8189ea97>] entry_SYSCALL_64_fastpath+0x12/0x6f [ 415.734663] ---[ end trace 23e364efca4427fa ]--- Should we report another bug and close this one? (In reply to cprigent from comment #10) > Logs from Rami contains: > > [ 415.734060] ------------[ cut here ]------------ > [ 415.734093] WARNING: CPU: 0 PID: 2912 at > drivers/gpu/drm/i915/intel_pm.c:3666 skl_update_other_pipe_wm+0x12e/0x16e > [i915]() > [ 415.734096] WARN_ON(!wm_changed) There is already bug 89055 for that WARNING. > Should we report another bug and close this one? I marked this as fixed since the original bug from this report is fixed. Unless you are seeing [drm:check_crtc_state [i915]] *ERROR* mismatch in base.adjusted_mode.crtc_clock (expected ..., new call traces should be added to *new* bug reports. Closing >year old resolved+fixed. *** Bug 97177 has been marked as a duplicate of this bug. *** |
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.
Created attachment 115446 [details] dmesg ==System Environment== -------------------------- Regression: No. This is first time test on this machine. Non-working platforms: SKL ==kernel== -------------------------- -nightly: 9a4da5ec419897b78c1d4a3949c0c049db5402c5 (fails) drm-intel-nightly: 2015y-04m-28d-14h-41m-15s UTC integration manifest -queued: de4de566f84b87f4d5f8265b11932088adb19896 (fails) drm/i915: Update DRIVER_DATE to 20150423 -fixes: a04f90a33fab74789b91fc9739999012f11022d1 (fails) drm/i915/chv: Implement WaDisableShadowRegForCpd ==Bug detailed description== ----------------------------- Dmesg shows: [ 656.766628] ------------[ cut here ]------------ [ 656.766644] WARNING: CPU: 4 PID: 5339 at drivers/gpu/drm/i915/intel_display.c:12008 check_crtc_state+0xb38/0xbc2 [i915]() [ 656.766645] pipe state doesn't match! [ 656.766646] Modules linked in: dm_mod snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hda_core snd_hwdep serio_raw snd_pcm pcspkr snd_timer snd soundcore i2c_i801 ppdev wmi battery parport_pc parport ac acpi_cpufreq i915 button video drm_kms_helper drm cfbfillrect cfbimgblt cfbcopyarea [ 656.766667] CPU: 4 PID: 5339 Comm: testdisplay Tainted: G U W 4.0.0_drm-intel-testing_43d9c2_20150424_+ #183 [ 656.766669] Hardware name: Intel Corporation Skylake Client platform/Skylake Halo DDR4 RVP11, BIOS SKLSE2R1.86C.X075.R04.1503240732 03/24/2015 [ 656.766670] 0000000000000009 ffff8804567ab738 ffffffff81859db8 0000000000000000 [ 656.766674] ffff8804567ab788 ffff8804567ab778 ffffffff8104227c ffff8804567ab780 [ 656.766676] ffffffffa00f06bf ffff88045a8f1000 ffff88045aa2d000 ffff88045aa2d728 [ 656.766679] Call Trace: [ 656.766685] [<ffffffff81859db8>] dump_stack+0x45/0x57 [ 656.766688] [<ffffffff8104227c>] warn_slowpath_common+0xa1/0xbb [ 656.766703] [<ffffffffa00f06bf>] ? check_crtc_state+0xb38/0xbc2 [i915] [ 656.766706] [<ffffffff81042339>] warn_slowpath_fmt+0x46/0x48 [ 656.766720] [<ffffffffa00f06bf>] check_crtc_state+0xb38/0xbc2 [i915] [ 656.766737] [<ffffffffa010030b>] intel_modeset_check_state+0x65c/0xa57 [i915] [ 656.766752] [<ffffffffa0101188>] intel_crtc_set_config+0x99f/0xc6e [i915] [ 656.766755] [<ffffffff8108ba1f>] ? vprintk_default+0x1d/0x1f [ 656.766764] [<ffffffffa00139c4>] ? drm_ut_debug_printk+0x55/0x57 [drm] [ 656.766774] [<ffffffffa001924c>] drm_mode_set_config_internal+0x5c/0xf7 [drm] [ 656.766784] [<ffffffffa001d5ec>] drm_mode_setcrtc+0x465/0x50f [drm] [ 656.766791] [<ffffffffa0010c73>] drm_ioctl+0x285/0x3f1 [drm] [ 656.766800] [<ffffffffa001d187>] ? drm_mode_setplane+0x19d/0x19d [drm] [ 656.766803] [<ffffffff8107e361>] ? trace_hardirqs_on+0xd/0xf [ 656.766806] [<ffffffff81154208>] do_vfs_ioctl+0x47b/0x4c3 [ 656.766809] [<ffffffff81862311>] ? retint_swapgs+0xe/0x44 [ 656.766811] [<ffffffff811542a3>] SyS_ioctl+0x53/0x84 [ 656.766814] [<ffffffff81861732>] system_call_fastpath+0x12/0x17 [ 656.766816] ---[ end trace d51b27aa9c815feb ]--- ==Reproduce steps== ---------------------------- ./testdisplay -a