Bug 93440 - [BYT,BSW] RPM wakelock ref not held during HW access (intel_pre_plane_update->intel_set_memory_cxsr)
Summary: [BYT,BSW] RPM wakelock ref not held during HW access (intel_pre_plane_update-...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: Other All
: medium critical
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-18 15:10 UTC by Imre Deak
Modified: 2019-01-16 07:32 UTC (History)
1 user (show)

See Also:
i915 platform: BSW/CHT, BYT
i915 features: GEM/Other


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Imre Deak 2015-12-18 15:10:00 UTC
The WARN below started to appear after adding stricter RPM wakeref assert checks. The testcases that triggered it during CI runs; probably not an exact list since we suppress errors after the first one by using WARN_ONCE, and I'm not sure how this can be related to GEM tests:

BYT:
  igt@gem_mmap@basic
  igt@kms_flip@basic-flip-vs-wf_vblank
BSW:
  igt@gem_mmap_gtt@basic-write
  igt@kms_pipe_crc_basic@read-crc-pipe-c-frame-sequence

[  112.225567] ------------[ cut here ]------------
[  112.225612] WARNING: CPU: 0 PID: 6638 at drivers/gpu/drm/i915/intel_drv.h:1446 gen6_write32+0x18a/0x220 [i915]()
[  112.225616] RPM wakelock ref not held during HW access
[  112.225619] Modules linked in:
[  112.225622]  i915 intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul lpc_ich i2c_hid i2c_designware_platform i2c_designware_core r8169 mii sdhci_acpi sdhci mmc_core
[  112.225647] CPU: 0 PID: 6638 Comm: kms_flip Tainted: G     U          4.4.0-rc5-gfxbench+ #1
[  112.225651] Hardware name: DN2820FYK, BIOS FYBYT10H.86A.0038.2014.0717.1455 07/17/2014
[  112.225654]  ffffffffa02138a0 ffff880074317ac0 ffffffff813e000c ffff880074317b08
[  112.225662]  ffff880074317af8 ffffffff810746a1 0000000000186500 0000000000000000
[  112.225669]  ffff880073400000 0000000000000000 ffff8800734a5d88 ffff880074317b58
[  112.225677] Call Trace:
[  112.225686]  [<ffffffff813e000c>] dump_stack+0x4e/0x82
[  112.225692]  [<ffffffff810746a1>] warn_slowpath_common+0x81/0xc0
[  112.225696]  [<ffffffff81074727>] warn_slowpath_fmt+0x47/0x50
[  112.225723]  [<ffffffffa01873ba>] gen6_write32+0x18a/0x220 [i915]
[  112.225742]  [<ffffffffa0139627>] intel_set_memory_cxsr+0x77/0x1a0 [i915]
[  112.225770]  [<ffffffffa01a67c4>] intel_pre_plane_update+0x84/0xb0 [i915]
[  112.225874]  [<ffffffffa01a6f8f>] intel_atomic_commit+0x38f/0x17f0 [i915]
[  112.225884]  [<ffffffff8150e142>] ? drm_atomic_check_only+0x142/0x600
[  112.225892]  [<ffffffff8150e7ab>] ? drm_atomic_set_crtc_for_connector+0x1b/0x90
[  112.225900]  [<ffffffff8150e632>] drm_atomic_commit+0x32/0x50
[  112.225910]  [<ffffffff814eb705>] drm_atomic_helper_set_config+0x75/0xb0
[  112.225918]  [<ffffffff814fd640>] drm_mode_set_config_internal+0x60/0x110
[  112.225926]  [<ffffffff815023d6>] drm_mode_setcrtc+0x186/0x4f0
[  112.225935]  [<ffffffff814f450d>] drm_ioctl+0x13d/0x590
[  112.225942]  [<ffffffff81502250>] ? drm_mode_setplane+0x1b0/0x1b0
[  112.225952]  [<ffffffff811d53ec>] do_vfs_ioctl+0x2fc/0x550
[  112.225961]  [<ffffffff8179a5e6>] ? int_ret_from_sys_call+0x52/0x9f
[  112.225968]  [<ffffffff811e0e5a>] ? __fget_light+0x6a/0x90
[  112.225975]  [<ffffffff811d567c>] SyS_ioctl+0x3c/0x70
[  112.225982]  [<ffffffff8179a45b>] entry_SYSCALL_64_fastpath+0x16/0x73
[  112.227738] ---[ end trace 6b624dc5633bbae2 ]---
Comment 1 Jani Nikula 2016-04-22 09:08:48 UTC
Imre, do the recent fixes in the area cover this one as well?
Comment 2 Imre Deak 2016-04-22 09:59:00 UTC
(In reply to Jani Nikula from comment #1)
> Imre, do the recent fixes in the area cover this one as well?

Yes, I believe that either of the following ones fixed it:

commit 177246a84d133888b5428e44201282d94635f473
Author: Matt Roper <matthew.d.roper@intel.com>
Date:   Fri Mar 4 15:59:39 2016 -0800

    drm/i915: Wait until after wm optimization to drop runtime PM reference


or 

https://lists.freedesktop.org/archives/intel-gfx/2016-February/087538.html
Comment 3 Jani Nikula 2016-04-22 10:14:04 UTC
Presumed fixed, please reopen if the problem persists.
Comment 4 Ortwin Glück 2019-01-08 08:18:41 UTC
I just got this on 4.20 but never had that before:

[Tue Jan  8 08:52:25 2019] ------------[ cut here ]------------
[Tue Jan  8 08:52:25 2019] RPM wakelock ref not held during HW access
[Tue Jan  8 08:52:25 2019] WARNING: CPU: 1 PID: 2808 at drivers/gpu/drm/i915/intel_drv.h:2015 gen6_read32+0x10c/0x140
[Tue Jan  8 08:52:25 2019] CPU: 1 PID: 2808 Comm: X Not tainted 4.20.0 #1
[Tue Jan  8 08:52:25 2019] Hardware name: Hewlett-Packard HP ZBook 15/1909, BIOS L70 Ver. 01.21 08/13/2014
[Tue Jan  8 08:52:25 2019] RIP: 0010:gen6_read32+0x10c/0x140
[Tue Jan  8 08:52:25 2019] Code: 16 af ff 0f 0b e9 30 ff ff ff 80 3d 77 c4 2b 01 00 0f 85 31 ff ff ff 48 c7 c7 d0 a3 58 9d c6 05 63 c4 2b 01 01 e8 a4 16 af ff <0f> 0b e9 17 ff ff ff b9 01 00 00 00 ba 01 00 00 00 89 ee 48 89 04
[Tue Jan  8 08:52:25 2019] RSP: 0018:ffffacb5858c7808 EFLAGS: 00010282
[Tue Jan  8 08:52:25 2019] RAX: 0000000000000000 RBX: ffff9c7903f60000 RCX: 0000000000000000
[Tue Jan  8 08:52:25 2019] RDX: 000000000000002a RSI: ffffffff9debbc4a RDI: ffffffff9deb9808
[Tue Jan  8 08:52:25 2019] RBP: 000000000007f020 R08: 0000000000000002 R09: 000000000001f280
[Tue Jan  8 08:52:25 2019] R10: ffff9c78b1725b3c R11: 0000000000000000 R12: ffff9c78b1725800
[Tue Jan  8 08:52:25 2019] R13: ffff9c7903f60000 R14: 0000000000000000 R15: 0000000000000012
[Tue Jan  8 08:52:25 2019] FS:  00007ff6f05bb5c0(0000) GS:ffff9c790ea40000(0000) knlGS:0000000000000000
[Tue Jan  8 08:52:25 2019] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Tue Jan  8 08:52:25 2019] CR2: 000055bdc25a7cf0 CR3: 00000003c4ee8005 CR4: 00000000001606e0
[Tue Jan  8 08:52:25 2019] Call Trace:
[Tue Jan  8 08:52:25 2019]  intel_psr_compute_config+0x76/0x1d0
[Tue Jan  8 08:52:25 2019]  intel_dp_compute_config+0x474/0x780
[Tue Jan  8 08:52:25 2019]  intel_ddi_compute_config+0x64/0x80
[Tue Jan  8 08:52:25 2019]  intel_atomic_check+0x542/0x10c0
[Tue Jan  8 08:52:25 2019]  drm_atomic_check_only+0x421/0x650
[Tue Jan  8 08:52:25 2019]  drm_atomic_commit+0xe/0x50
[Tue Jan  8 08:52:25 2019]  restore_fbdev_mode_atomic+0x16f/0x1d0
[Tue Jan  8 08:52:25 2019]  drm_fb_helper_restore_fbdev_mode_unlocked+0x40/0x90
[Tue Jan  8 08:52:25 2019]  drm_fb_helper_set_par+0x24/0x50
[Tue Jan  8 08:52:25 2019]  intel_fbdev_set_par+0x11/0x40
[Tue Jan  8 08:52:25 2019]  fb_set_var+0x176/0x3c0
[Tue Jan  8 08:52:25 2019]  ? nvkm_memory_unref+0x45/0x50
[Tue Jan  8 08:52:25 2019]  ? ktime_get+0x36/0x90
[Tue Jan  8 08:52:25 2019]  ? nvkm_object_del+0x5b/0xa0
[Tue Jan  8 08:52:25 2019]  fbcon_blank+0x18c/0x2e0
[Tue Jan  8 08:52:25 2019]  do_unblank_screen+0x8d/0x140
[Tue Jan  8 08:52:25 2019]  vt_ioctl+0x4d2/0x1140
[Tue Jan  8 08:52:25 2019]  ? __wake_up_common_lock+0x84/0xb0
[Tue Jan  8 08:52:25 2019]  tty_ioctl+0xeb/0x890
[Tue Jan  8 08:52:25 2019]  ? jbd2_journal_stop+0xea/0x2c0
[Tue Jan  8 08:52:25 2019]  do_vfs_ioctl+0x9c/0x620
[Tue Jan  8 08:52:25 2019]  ? vga_arb_release+0xc7/0xd0
[Tue Jan  8 08:52:25 2019]  ? mntput_no_expire+0xc/0x1c0
[Tue Jan  8 08:52:25 2019]  ksys_ioctl+0x35/0x60
[Tue Jan  8 08:52:25 2019]  __x64_sys_ioctl+0x11/0x20
[Tue Jan  8 08:52:25 2019]  do_syscall_64+0x3d/0xf0
[Tue Jan  8 08:52:25 2019]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[Tue Jan  8 08:52:25 2019] RIP: 0033:0x7ff6ee1d82a7
[Tue Jan  8 08:52:25 2019] Code: 00 00 00 75 0c 48 c7 c0 ff ff ff ff 48 83 c4 18 c3 e8 4d e0 01 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d b1 7b 2c 00 f7 d8 64 89 01 48
[Tue Jan  8 08:52:25 2019] RSP: 002b:00007fff669e9918 EFLAGS: 00003246 ORIG_RAX: 0000000000000010
[Tue Jan  8 08:52:25 2019] RAX: ffffffffffffffda RBX: 000055bdc1037520 RCX: 00007ff6ee1d82a7
[Tue Jan  8 08:52:25 2019] RDX: 0000000000000000 RSI: 0000000000004b3a RDI: 000000000000000a
[Tue Jan  8 08:52:25 2019] RBP: 00000000ffffffff R08: 000055bdc256c080 R09: 000055bdc256c090
[Tue Jan  8 08:52:25 2019] R10: 0000000000000038 R11: 0000000000003246 R12: 000055bdc1059100
[Tue Jan  8 08:52:25 2019] R13: ffffffffffffffff R14: 000055bdc10550a8 R15: ffffffffffffffff
[Tue Jan  8 08:52:25 2019] ---[ end trace 96b8cfd507b80f52 ]---
Comment 5 Chris Wilson 2019-01-11 19:07:59 UTC
(In reply to Ortwin Glück from comment #4)
> I just got this on 4.20 but never had that before:

Please do open a new bug report providing a full dmesg (drm.debug=0xe) preferrably reproducing the issue with drm-tip.


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.