linux/drivers/gpu/drm/nouveau
Ben Skeggs 8fa4338acc drm/nouveau: enable autosuspend only when it'll actually be used
This prevents a deadlock that somehow results from the suspend() ->
forbid() -> resume() callchain.

[  125.266960] [drm] Initialized nouveau 1.3.1 20120801 for 0000:02:00.0 on minor 1
[  370.120872] INFO: task kworker/4:1:77 blocked for more than 120 seconds.
[  370.120920]       Tainted: G           O    4.12.0-rc3 #20
[  370.120947] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  370.120982] kworker/4:1     D13808    77      2 0x00000000
[  370.120998] Workqueue: pm pm_runtime_work
[  370.121004] Call Trace:
[  370.121018]  __schedule+0x2bf/0xb40
[  370.121025]  ? mark_held_locks+0x5f/0x90
[  370.121038]  schedule+0x3d/0x90
[  370.121044]  rpm_resume+0x107/0x870
[  370.121052]  ? finish_wait+0x90/0x90
[  370.121065]  ? pci_pm_runtime_resume+0xa0/0xa0
[  370.121070]  pm_runtime_forbid+0x4c/0x60
[  370.121129]  nouveau_pmops_runtime_suspend+0xaf/0xc0 [nouveau]
[  370.121139]  pci_pm_runtime_suspend+0x5f/0x170
[  370.121147]  ? pci_pm_runtime_resume+0xa0/0xa0
[  370.121152]  __rpm_callback+0xb9/0x1e0
[  370.121159]  ? pci_pm_runtime_resume+0xa0/0xa0
[  370.121166]  rpm_callback+0x24/0x80
[  370.121171]  ? pci_pm_runtime_resume+0xa0/0xa0
[  370.121176]  rpm_suspend+0x138/0x6e0
[  370.121192]  pm_runtime_work+0x7b/0xc0
[  370.121199]  process_one_work+0x253/0x6a0
[  370.121216]  worker_thread+0x4d/0x3b0
[  370.121229]  kthread+0x133/0x150
[  370.121234]  ? process_one_work+0x6a0/0x6a0
[  370.121238]  ? kthread_create_on_node+0x70/0x70
[  370.121246]  ret_from_fork+0x2a/0x40
[  370.121283]
               Showing all locks held in the system:
[  370.121291] 2 locks held by kworker/4:1/77:
[  370.121298]  #0:  ("pm"){.+.+.+}, at: [<ffffffffac0d3530>] process_one_work+0x1d0/0x6a0
[  370.121315]  #1:  ((&dev->power.work)){+.+.+.}, at: [<ffffffffac0d3530>] process_one_work+0x1d0/0x6a0
[  370.121330] 1 lock held by khungtaskd/81:
[  370.121333]  #0:  (tasklist_lock){.+.+..}, at: [<ffffffffac10fc8d>] debug_show_all_locks+0x3d/0x1a0
[  370.121355] 1 lock held by dmesg/1639:
[  370.121358]  #0:  (&user->lock){+.+.+.}, at: [<ffffffffac124b6d>] devkmsg_read+0x4d/0x360

[  370.121377] =============================================

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2017-06-06 14:04:03 +10:00
..
dispnv04 drm: Add acquire ctx to ->gamma_set hook 2017-04-06 10:21:55 +02:00
include drm/nouveau/gr/gp107: initial support 2017-04-06 14:39:04 +10:00
nvif drm/nouveau/core/client: allow creation of subclients 2017-02-17 15:15:00 +10:00
nvkm drm/nouveau/fifo/gk104-: Silence a locking warning 2017-05-17 09:09:41 +10:00
Kbuild drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo 2016-10-12 17:29:29 +10:00
Kconfig drm: fix compilations issues introduced by "drm: allow to use mmuless SoC" 2017-01-09 11:30:30 +01:00
nouveau_abi16.c drm/nouveau: allocate device object for every client 2017-02-17 15:15:04 +10:00
nouveau_abi16.h
nouveau_acpi.c gpu: drm: drivers: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-01 09:44:11 +01:00
nouveau_acpi.h
nouveau_backlight.c drm/nouveau: allocate device object for every client 2017-02-17 15:15:04 +10:00
nouveau_bios.c drm/nouveau: allocate device object for every client 2017-02-17 15:15:04 +10:00
nouveau_bios.h drm/nouveau/nouveau: bios pointers may be unaligned, use proper accessors 2016-10-12 17:29:02 +10:00
nouveau_bo.c drm/ttm: add io_mem_pfn callback 2017-04-04 23:33:42 -04:00
nouveau_bo.h drm/nouveau: size is u64 everywhere 2017-02-17 17:38:04 +10:00
nouveau_chan.c drm/nouveau: check for dead channel before trying to idle 2017-02-17 17:38:09 +10:00
nouveau_chan.h drm/nouveau: request notifications for channels that have been killed 2017-02-17 17:38:09 +10:00
nouveau_connector.c drm/nouveau/i2c: modify aux interface to return length actually transferred 2017-03-07 17:05:16 +10:00
nouveau_connector.h drm: Don't include <drm/drm_encoder.h> in <drm/drm_crtc.h> 2016-12-18 16:29:29 +05:30
nouveau_crtc.h drm/nouveau/kms/nv50: remove code to support non-atomic connector properties 2016-11-07 14:05:01 +10:00
nouveau_debugfs.c drm/nouveau: Remove nouveau_drm_debugfs_cleanup() 2017-03-01 16:09:52 +01:00
nouveau_debugfs.h drm/nouveau: Remove nouveau_drm_debugfs_cleanup() 2017-03-01 16:09:52 +01:00
nouveau_display.c drm/nouveau: Fix drm poll_helper handling 2017-05-17 09:09:41 +10:00
nouveau_display.h drm: Add acquire ctx parameter to ->set_config 2017-03-29 09:56:25 +02:00
nouveau_dma.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_dma.h
nouveau_dp.c drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream 2016-11-07 14:05:03 +10:00
nouveau_drm.c drm/nouveau: enable autosuspend only when it'll actually be used 2017-06-06 14:04:03 +10:00
nouveau_drv.h drm/nouveau: replace multiple open-coded runpm support checks with function 2017-06-06 14:04:03 +10:00
nouveau_encoder.h drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream 2016-11-07 14:05:03 +10:00
nouveau_fbcon.c Merge airlied/drm-next into drm-misc-next 2017-02-26 21:34:42 +01:00
nouveau_fbcon.h drm/nouveau/fbcon: refcount the drm_framebuffer 2016-11-07 14:04:44 +10:00
nouveau_fence.c Less anger inducing pull request for 4.11 2017-02-23 18:58:18 -08:00
nouveau_fence.h drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers 2017-01-31 20:05:25 +10:00
nouveau_gem.c treewide: use kv[mz]alloc* rather than opencoded variants 2017-05-08 17:15:13 -07:00
nouveau_gem.h drm/nouveau: size is u64 everywhere 2017-02-17 17:38:04 +10:00
nouveau_hwmon.c drm/nouveau/hwmon: expose power_max and power_crit 2017-02-17 17:38:17 +10:00
nouveau_hwmon.h
nouveau_ioc32.c
nouveau_ioctl.h
nouveau_led.c drm/nouveau/drm/nouveau/led: prevent a possible use-after-free 2017-02-17 17:38:07 +10:00
nouveau_led.h drm/nouveau/nouveau/led: prevent compiling the led-code if nouveau=y and leds=m 2017-01-31 20:05:25 +10:00
nouveau_nvif.c drm/nouveau/core/client: pass notification callback to nvkm_client_new 2017-02-17 15:15:00 +10:00
nouveau_platform.c drm/nouveau/platform: support for probing GP10B 2017-04-06 14:39:04 +10:00
nouveau_platform.h drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_prime.c drm/nouveau: pass nvif_client to nouveau_bo_new() instead of drm_device 2017-02-17 15:15:02 +10:00
nouveau_reg.h
nouveau_sgdma.c drm/nouveau: s/mem/reg/ for struct ttm_mem_reg variables 2017-02-17 15:15:04 +10:00
nouveau_ttm.c drm/nouveau: s/mem/reg/ for struct ttm_mem_reg variables 2017-02-17 15:15:04 +10:00
nouveau_ttm.h
nouveau_usif.c drm: Remove drm_pending_event->pid 2017-03-14 14:38:33 +01:00
nouveau_usif.h
nouveau_vga.c drm/nouveau: replace multiple open-coded runpm support checks with function 2017-06-06 14:04:03 +10:00
nouveau_vga.h
nv04_fbcon.c drm/nouveau: allocate device object for every client 2017-02-17 15:15:04 +10:00
nv04_fence.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
nv10_fence.c drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nv10_fence.h drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nv17_fence.c drm/nouveau: s/mem/reg/ for struct ttm_mem_reg variables 2017-02-17 15:15:04 +10:00
nv50_display.c drm/nouveau/kms/nv50: add null check before pointer dereference 2017-06-06 14:04:03 +10:00
nv50_display.h drm/nouveau/kms/nv50: remove code to support non-atomic page flips 2016-11-07 14:05:01 +10:00
nv50_fbcon.c drm/nouveau/fbcon: make use of drm_fb_helper.fb 2016-11-07 14:04:44 +10:00
nv50_fence.c drm/nouveau: s/mem/reg/ for struct ttm_mem_reg variables 2017-02-17 15:15:04 +10:00
nv84_fence.c Linux 4.10-rc8 2017-02-23 12:10:12 +10:00
nvc0_fbcon.c drm/nouveau/fbcon: make use of drm_fb_helper.fb 2016-11-07 14:04:44 +10:00
nvc0_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00