Bug 108002

Summary: [CI][BAT] igt@drv_selftest@live_contexts - dmesg-warn - RPM wakelock ref not held during HW access
Product: DRI Reporter: Martin Peres <martin.peres>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: highest CC: intel-gfx-bugs
Version: DRI git   
Hardware: Other   
OS: All   
Whiteboard: ReadyForDev
i915 platform: BSW/CHT i915 features: power/Other

Description Martin Peres 2018-09-20 13:36:50 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4846/fi-bsw-n3050/igt@drv_selftest@live_contexts.html

<7> [520.050015] [drm:intel_power_well_disable [i915]] disabling always-on
<4> [520.053562] ------------[ cut here ]------------
<4> [520.053571] RPM wakelock ref not held during HW access
<4> [520.053742] WARNING: CPU: 1 PID: 7952 at drivers/gpu/drm/i915/intel_drv.h:2013 i915_vma_pin_iomap+0x1a5/0x320 [i915]
<4> [520.053749] Modules linked in: i915(+) amdgpu chash gpu_sched ttm vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel bluetooth ecdh_generic coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec ghash_clmulni_intel snd_hwdep snd_hda_core snd_pcm r8169 lpc_ich pinctrl_cherryview prime_numbers [last unloaded: i915]
<4> [520.053884] CPU: 1 PID: 7952 Comm: drv_selftest Tainted: G     U            4.19.0-rc4-CI-CI_DRM_4846+ #1
<4> [520.053889] Hardware name:  /NUC5CPYB, BIOS PYBSWCEL.86A.0058.2016.1102.1842 11/02/2016
<4> [520.053989] RIP: 0010:i915_vma_pin_iomap+0x1a5/0x320 [i915]
<4> [520.053996] Code: 2f c1 e0 0f 0b e9 9b fe ff ff 80 3d f4 fa 1a 00 00 0f 85 9c fe ff ff 48 c7 c7 d0 89 58 a0 c6 05 e0 fa 1a 00 01 e8 4b 2f c1 e0 <0f> 0b e9 82 fe ff ff 48 c7 c1 4a d3 56 a0 ba 63 01 00 00 48 c7 c6
<4> [520.054001] RSP: 0018:ffffc900004139a8 EFLAGS: 00010282
<4> [520.054011] RAX: 0000000000000000 RBX: ffff880163b27100 RCX: 0000000000000001
<4> [520.054016] RDX: 0000000080000001 RSI: ffffffff820c2c26 RDI: 00000000ffffffff
<4> [520.054020] RBP: ffff88014e410000 R08: 000000008f30a0d0 R09: 0000000000000000
<4> [520.054025] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000001442
<4> [520.054031] R13: ffff880167a30bd8 R14: ffffc9000039d000 R15: ffff8801731245e0
<4> [520.054036] FS:  00007ffa12fb6980(0000) GS:ffff88017bb00000(0000) knlGS:0000000000000000
<4> [520.054041] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4> [520.054046] CR2: 000055663fedf0b8 CR3: 0000000140a1a000 CR4: 00000000001006e0
<4> [520.054051] Call Trace:
<4> [520.054157]  intel_ring_pin+0x120/0x320 [i915]
<4> [520.054263]  execlists_context_pin+0x190/0xdb0 [i915]
<4> [520.054371]  i915_request_alloc+0x54/0x820 [i915]
<4> [520.054472]  __igt_switch_to_kernel_context+0x7f/0x2c0 [i915]
<4> [520.054572]  igt_switch_to_kernel_context+0x5a/0xe0 [i915]
<4> [520.054681]  __i915_subtests+0x5e/0xf0 [i915]
<4> [520.054782]  i915_gem_context_live_selftests+0xf3/0x180 [i915]
<4> [520.054890]  __run_selftests+0x10b/0x190 [i915]
<4> [520.054997]  i915_live_selftests+0x2c/0x60 [i915]
<4> [520.055089]  i915_pci_probe+0x50/0xa0 [i915]
<4> [520.055103]  pci_device_probe+0xa1/0x130
<4> [520.055117]  really_probe+0x25d/0x3c0
<4> [520.055128]  driver_probe_device+0x10a/0x120
<4> [520.055137]  __driver_attach+0xdb/0x100
<4> [520.055146]  ? driver_probe_device+0x120/0x120
<4> [520.055153]  bus_for_each_dev+0x74/0xc0
<4> [520.055165]  bus_add_driver+0x15f/0x250
<4> [520.055173]  ? 0xffffffffa00bd000
<4> [520.055181]  driver_register+0x56/0xe0
<4> [520.055188]  ? 0xffffffffa00bd000
<4> [520.055195]  do_one_initcall+0x58/0x2e0
<4> [520.055202]  ? rcu_lockdep_current_cpu_online+0x8f/0xd0
<4> [520.055210]  ? do_init_module+0x1d/0x1ea
<4> [520.055217]  ? rcu_read_lock_sched_held+0x6f/0x80
<4> [520.055224]  ? kmem_cache_alloc_trace+0x264/0x290
<4> [520.055237]  do_init_module+0x56/0x1ea
<4> [520.055247]  load_module+0x26ba/0x29a0
<4> [520.055268]  ? vfs_read+0x122/0x140
<4> [520.055298]  ? __se_sys_finit_module+0xd3/0xf0
<4> [520.055304]  __se_sys_finit_module+0xd3/0xf0
<4> [520.055331]  do_syscall_64+0x55/0x190
<4> [520.055341]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [520.055347] RIP: 0033:0x7ffa1288a839
<4> [520.055353] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48
<4> [520.055358] RSP: 002b:00007fff3c5aabd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
<4> [520.055367] RAX: ffffffffffffffda RBX: 00005608091eab70 RCX: 00007ffa1288a839
<4> [520.055372] RDX: 0000000000000000 RSI: 00005608091eb8b0 RDI: 0000000000000006
<4> [520.055377] RBP: 00005608091eb8b0 R08: 0000000000000004 R09: 0000000000000000
<4> [520.055382] R10: 00007fff3c5aad50 R11: 0000000000000246 R12: 0000000000000000
<4> [520.055387] R13: 00005608091e4ae0 R14: 0000000000000020 R15: 000000000000003c
<4> [520.055412] irq event stamp: 267426
<4> [520.055419] hardirqs last  enabled at (267425): [<ffffffff810f81ca>] console_unlock+0x3fa/0x5f0
<4> [520.055426] hardirqs last disabled at (267426): [<ffffffff81001910>] trace_hardirqs_off_thunk+0x1a/0x1c
<4> [520.055433] softirqs last  enabled at (267282): [<ffffffff81c0031d>] __do_softirq+0x31d/0x483
<4> [520.055440] softirqs last disabled at (267263): [<ffffffff8108c4c9>] irq_exit+0xa9/0xc0
<4> [520.055540] WARNING: CPU: 1 PID: 7952 at drivers/gpu/drm/i915/intel_drv.h:2013 i915_vma_pin_iomap+0x1a5/0x320 [i915]
<4> [520.055545] ---[ end trace ae1afb789f1ae90d ]---
Comment 1 Martin Peres 2018-09-20 13:38:56 UTC
Moving to the right component, sorry for the noise!
Comment 2 Chris Wilson 2018-09-20 13:41:45 UTC
https://patchwork.freedesktop.org/patch/251410/
Comment 3 Chris Wilson 2018-09-20 16:29:08 UTC
commit b8bdd9cc6049fe8d96178001da84ac98e697a5ba (HEAD -> drm-intel-next-queued, drm-intel/drm-intel-next-queued)
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Sep 20 15:49:34 2018 +0100

    drm/i915/selftests: Live tests emit requests and so require rpm
    
    As we emit requests or touch HW directly for some of the live tests, the
    requirement is that we hold the rpm wakeref before doing so. We want a
    mix of granularity since we will want to test runtime suspend, so try to
    mark up only the critical sections where we need rpm for the live test.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108002
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20180920144934.16611-1-chris@chris-wilson.co.uk
Comment 4 Lakshmi 2018-10-04 18:55:52 UTC
This issue occurred twice (12 rounds between the occurrence) 2 weeks ago.  Not seen this issue since 209 rounds. Closing this issue as 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.