Chris Wilson
181df2d458
drm/i915: Take rpm wakelock for releasing the fence on unbind
Unbind the vma may happen at any time, outside of the normal GT wakeref.
As such it relies on having a wakeref of its own. However, we can forgo
clearing the register whilst the device is asleep and just mark it as
unused - so that when we do wake up the device, we will clear the unused
fence register (see i915_gem_restore_fences).
[22423.944631] WARNING: CPU: 3 PID: 26178 at drivers/gpu/drm/i915/intel_drv.h:1739 i915_vma_put_fence+0xf3/0x100 [i915]
[22423.946053] RPM wakelock ref not held during HW access
[22423.946056] Modules linked in: vgem(E) i915(E) nls_ascii(E) nls_cp437(E) vfat(E) fat(E) x86_pkg_temp_thermal(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) ghash_clmulni_intel(E) intel_gtt(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) evdev(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) cryptd(E) glue_helper(E) sysimgblt(E) fb_sys_fops(E) prime_numbers(E) drm(E) efivars(E) mei_me(E) lpc_ich(E) mei(E) mfd_core(E) battery(E) video(E) acpi_pad(E) button(E) tpm_tis(E) tpm_tis_core(E) tpm(E) autofs4(E) i2c_i801(E) thermal(E) fan(E) i2c_designware_platform(E) i2c_designware_core(E)
[22423.946438] CPU: 2 PID: 26178 Comm: gem_concurrent_ Tainted: G E 4.10.0+ #101
[22423.946513] Hardware name: ��������������������������������� ���������������������������������/���������������������������������, BIOS RYBDWi35.86A.0246.2
[22423.946600] Call Trace:
[22423.946641] dump_stack+0x68/0x9f
[22423.946703] __warn+0x107/0x130
[22423.946763] warn_slowpath_fmt+0xa8/0xe0
[22423.946825] ? __warn+0x130/0x130
[22423.946868] ? free_hot_cold_page_list+0x53/0x70
[22423.946942] ? mark_lock+0xcc/0x7f0
[22423.946997] ? __lock_is_held+0x84/0x100
[22423.947115] ? i915_vma_put_fence+0x64/0x100 [i915]
[22423.947224] i915_vma_put_fence+0xf3/0x100 [i915]
[22423.947335] i915_vma_unbind+0x4da/0x560 [i915]
[22423.947387] ? rb_erase+0x812/0x8a0
[22423.947439] ? kfree+0xa2/0xd0
[22423.947562] i915_vma_close+0x159/0x180 [i915]
[22423.947674] intel_ring_free+0x31/0x50 [i915]
[22423.947776] i915_gem_context_free+0x1ff/0x3d0 [i915]
[22423.947887] context_close+0x106/0x110 [i915]
[22423.947989] context_idr_cleanup+0xc/0x10 [i915]
[22423.948041] idr_for_each+0x14d/0x1d0
[22423.948158] ? context_close+0x110/0x110 [i915]
[22423.948206] ? get_from_free_list+0x70/0x70
[22423.948261] ? __lock_is_held+0x84/0x100
[22423.948325] ? __mutex_unlock_slowpath+0xd4/0x400
[22423.948448] i915_gem_context_close+0x4b/0x90 [i915]
[22423.948544] i915_driver_preclose+0x28/0x50 [i915]
[22423.948620] drm_release+0x175/0x690 [drm]
[22423.948681] ? fcntl_setlk+0x5e0/0x5e0
[22423.948746] __fput+0x17d/0x300
[22423.948807] ____fput+0x9/0x10
[22423.948859] task_work_run+0xa7/0xe0
[22423.948924] do_exit+0x4d2/0x13e0
[22423.948986] ? mm_update_next_owner+0x320/0x320
[22423.949051] ? __do_page_fault+0x209/0x5c0
[22423.949110] ? mark_held_locks+0x23/0xc0
[22423.949166] ? entry_SYSCALL_64_fastpath+0x5/0xb1
[22423.949232] do_group_exit+0x93/0x160
[22423.949289] SyS_exit_group+0x18/0x20
[22423.949350] entry_SYSCALL_64_fastpath+0x1c/0xb1
[22423.949403] RIP: 0033:0x7f9cc2e154c8
[22423.949484] RSP: 002b:00007ffd7e81b448 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[22423.949557] RAX: ffffffffffffffda RBX: ffffffff810ef1f0 RCX: 00007f9cc2e154c8
[22423.949617] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
[22423.949677] RBP: ffff880367e9ff98 R08: 00000000000000e7 R09: ffffffffffffff88
[22423.949741] R10: 00007f9cc1d5c000 R11: 0000000000000246 R12: 00007f9cc30f6c30
[22423.949798] R13: 0000000000000000 R14: 00007f9cc30f6c20 R15: 0000000000000003
[22423.949868] ? trace_hardirqs_off_caller+0xc0/0x110
v2: Move the rpm check down a layer so that we still perform the
vma/fence update required for the deferred mmio write on resume.
v3: Don't touch i915_gem_object_set_cache_level() and leave the rpm to
the low level routines (such as i915_vma_put_fence).
v4: vma may be null in fence_write, so extract drm_i915_private from
fence->i915
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170306092916.11623-3-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-03-06 14:38:18 +00:00
..
2017-02-06 19:36:04 -08:00
2017-01-06 15:45:32 -05:00
2016-12-24 11:46:01 -08:00
2017-01-11 09:27:30 +01:00
2017-02-06 14:52:10 +01:00
2017-01-17 14:23:44 +02:00
2017-01-23 13:27:42 -05:00
2016-12-16 10:24:44 -08:00
2016-12-25 10:47:44 +01:00
2016-12-24 11:46:01 -08:00
2017-02-27 09:30:11 +01:00
2017-01-21 18:46:45 -08:00
2017-01-17 10:08:38 +01:00
2017-02-06 14:52:10 +01:00
2016-12-24 11:46:01 -08:00
2017-02-06 14:16:23 -08:00
2016-12-18 15:49:10 -08:00
2017-01-03 00:21:45 +01:00
2016-12-24 11:46:01 -08:00
2017-01-25 15:35:11 +05:30
2017-01-27 15:24:44 -02:00
2016-12-24 11:46:01 -08:00
2017-01-11 09:11:39 +01:00
2017-02-01 21:17:49 +01:00
2017-01-19 09:57:20 +01:00
2017-03-06 14:38:18 +00:00
2017-01-31 12:59:33 +01:00
2017-01-31 10:59:48 +01:00
2017-01-02 10:15:28 -08:00
2016-12-25 10:47:44 +01:00
2017-02-09 17:13:01 +01:00
2016-12-24 11:46:01 -08:00
2016-12-13 10:41:53 -08:00
2017-01-22 13:35:40 +00:00
2017-02-08 12:28:30 -05:00
2017-02-07 14:31:45 -08:00
2017-01-06 10:49:36 -08:00
2016-12-31 19:06:44 +00:00
2017-01-27 11:27:34 -05:00
2016-12-25 10:47:44 +01:00
2016-12-24 11:46:01 -08:00
2016-12-13 12:11:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-25 17:21:22 +01:00
2017-02-03 10:26:14 -05:00
2017-02-06 14:37:55 -08:00
2017-01-24 16:26:14 -08:00
2016-12-24 11:46:01 -08:00
2016-12-19 08:16:26 -08:00
2017-01-11 07:43:57 +01:00
2017-02-08 12:22:27 +01:00
2017-01-04 20:50:18 +01:00
2017-02-10 13:44:49 -05:00
2016-12-23 16:11:07 -05:00
2016-12-24 11:46:01 -08:00
2017-02-04 14:47:31 -08:00
2017-01-26 17:49:14 +02:00
2017-01-04 18:22:47 +01:00
2016-12-15 12:46:48 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2017-01-28 21:54:21 +01:00
2017-02-03 08:53:51 -06:00
2016-12-12 18:55:06 -08:00
2016-12-25 10:47:44 +01:00
2016-12-14 10:49:33 -08:00
2017-01-30 15:53:57 +01:00
2017-01-22 12:47:06 +02:00
2016-12-24 11:46:01 -08:00
2016-12-25 17:21:22 +01:00
2016-12-12 19:56:15 -08:00
2016-12-15 11:45:13 -08:00
2017-02-03 13:46:38 -08:00
2016-12-30 03:26:31 -08:00
2016-12-15 16:03:25 -08:00
2016-12-30 03:12:11 -08:00
2017-01-26 23:03:21 +01:00
2017-02-11 09:01:03 -08:00
2016-12-24 11:46:01 -08:00
2017-02-11 09:01:03 -08:00
2016-12-12 18:55:08 -08:00
2017-01-12 13:37:49 -08:00
2017-01-20 12:25:11 -08:00
2017-02-08 15:41:43 -08:00
2017-02-08 08:25:39 -08:00
2017-01-25 09:51:08 +08:00
2016-12-13 12:11:01 -08:00
2017-01-11 09:22:54 +01:00
2016-12-10 14:57:58 +01:00
2017-02-03 22:19:15 +01:00
2017-02-07 11:48:16 -07:00
2017-02-03 23:38:57 +02:00
2017-01-27 11:00:42 +10:00
2017-02-03 23:38:50 +02:00
2017-01-11 10:42:16 +01:00
2016-12-24 11:27:45 -08:00
2017-01-27 12:17:07 -08:00
2016-12-24 11:46:01 -08:00