Kai-Heng Feng
1f60072320
drm/amdgpu/acp: Make PM domain really work
[ Upstream commit aff890288de2d818e4f83ec40c9315e2d735df07 ]
Devices created by mfd_add_hotplug_devices() don't really increase the
index of its name, so get_mfd_cell_dev() cannot find any device, hence a
NULL dev is passed to pm_genpd_add_device():
[ 56.974926] (NULL device *): amdgpu: device acp_audio_dma.0.auto added to pm domain
[ 56.974933] (NULL device *): amdgpu: Failed to add dev to genpd
[ 56.974941] [drm:amdgpu_device_ip_init [amdgpu]] *ERROR* hw_init of IP block <acp_ip> failed -22
[ 56.975810] amdgpu 0000:00:01.0: amdgpu: amdgpu_device_ip_init failed
[ 56.975839] amdgpu 0000:00:01.0: amdgpu: Fatal error during GPU init
[ 56.977136] ------------[ cut here ]------------
[ 56.977143] kernel BUG at mm/slub.c:4206!
[ 56.977158] invalid opcode: 0000 [#1] SMP NOPTI
[ 56.977167] CPU: 1 PID: 1648 Comm: modprobe Not tainted 5.12.0-051200rc8-generic #202104182230
[ 56.977175] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./FM2A68M-HD+, BIOS P5.20 02/13/2019
[ 56.977180] RIP: 0010:kfree+0x3bf/0x410
[ 56.977195] Code: 89 e7 48 d3 e2 f7 da e8 5f 0d 02 00 80 e7 02 75 3e 44 89 ee 4c 89 e7 e8 ef 5f fd ff e9 fa fe ff ff 49 8b 44 24 08 a8 01 75 b7 <0f> 0b 4c 8b 4d b0 48 8b 4d a8 48 89 da 4c 89 e6 41 b8 01 00 00 00
[ 56.977202] RSP: 0018:ffffa48640ff79f0 EFLAGS: 00010246
[ 56.977210] RAX: 0000000000000000 RBX: ffff9286127d5608 RCX: 0000000000000000
[ 56.977215] RDX: 0000000000000000 RSI: ffffffffc099d0fb RDI: ffff9286127d5608
[ 56.977220] RBP: ffffa48640ff7a48 R08: 0000000000000001 R09: 0000000000000001
[ 56.977224] R10: 0000000000000000 R11: ffff9286087d8458 R12: fffff3ae0449f540
[ 56.977229] R13: 0000000000000000 R14: dead000000000122 R15: dead000000000100
[ 56.977234] FS: 00007f9de5929540(0000) GS:ffff928612e80000(0000) knlGS:0000000000000000
[ 56.977240] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 56.977245] CR2: 00007f697dd97160 CR3: 00000001110f0000 CR4: 00000000001506e0
[ 56.977251] Call Trace:
[ 56.977261] amdgpu_dm_encoder_destroy+0x1b/0x30 [amdgpu]
[ 56.978056] drm_mode_config_cleanup+0x4f/0x2e0 [drm]
[ 56.978147] ? kfree+0x3dd/0x410
[ 56.978157] ? drm_managed_release+0xc8/0x100 [drm]
[ 56.978232] drm_mode_config_init_release+0xe/0x10 [drm]
[ 56.978311] drm_managed_release+0x9d/0x100 [drm]
[ 56.978388] devm_drm_dev_init_release+0x4d/0x70 [drm]
[ 56.978450] devm_action_release+0x15/0x20
[ 56.978459] release_nodes+0x77/0xc0
[ 56.978469] devres_release_all+0x3f/0x50
[ 56.978477] really_probe+0x245/0x460
[ 56.978485] driver_probe_device+0xe9/0x160
[ 56.978492] device_driver_attach+0xab/0xb0
[ 56.978499] __driver_attach+0x8f/0x150
[ 56.978506] ? device_driver_attach+0xb0/0xb0
[ 56.978513] bus_for_each_dev+0x7e/0xc0
[ 56.978521] driver_attach+0x1e/0x20
[ 56.978528] bus_add_driver+0x135/0x1f0
[ 56.978534] driver_register+0x91/0xf0
[ 56.978540] __pci_register_driver+0x54/0x60
[ 56.978549] amdgpu_init+0x77/0x1000 [amdgpu]
[ 56.979246] ? 0xffffffffc0dbc000
[ 56.979254] do_one_initcall+0x48/0x1d0
[ 56.979265] ? kmem_cache_alloc_trace+0x120/0x230
[ 56.979274] ? do_init_module+0x28/0x280
[ 56.979282] do_init_module+0x62/0x280
[ 56.979288] load_module+0x71c/0x7a0
[ 56.979296] __do_sys_finit_module+0xc2/0x120
[ 56.979305] __x64_sys_finit_module+0x1a/0x20
[ 56.979311] do_syscall_64+0x38/0x90
[ 56.979319] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 56.979328] RIP: 0033:0x7f9de54f989d
[ 56.979335] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 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 c3 f5 0c 00 f7 d8 64 89 01 48
[ 56.979342] RSP: 002b:00007ffe3c395a28 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 56.979350] RAX: ffffffffffffffda RBX: 0000560df3ef4330 RCX: 00007f9de54f989d
[ 56.979355] RDX: 0000000000000000 RSI: 0000560df3a07358 RDI: 000000000000000f
[ 56.979360] RBP: 0000000000040000 R08: 0000000000000000 R09: 0000000000000000
[ 56.979365] R10: 000000000000000f R11: 0000000000000246 R12: 0000560df3a07358
[ 56.979369] R13: 0000000000000000 R14: 0000560df3ef4460 R15: 0000560df3ef4330
[ 56.979377] Modules linked in: amdgpu(+) iommu_v2 gpu_sched drm_ttm_helper ttm drm_kms_helper cec rc_core i2c_algo_bit fb_sys_fops syscopyarea sysfillrect sysimgblt nft_counter xt_tcpudp ipt_REJECT nf_reject_ipv4 xt_conntrack iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_raw iptable_security ip_set nf_tables libcrc32c nfnetlink ip6_tables iptable_filter bpfilter input_leds binfmt_misc edac_mce_amd kvm_amd ccp kvm snd_hda_codec_realtek snd_hda_codec_generic crct10dif_pclmul snd_hda_codec_hdmi ledtrig_audio ghash_clmulni_intel aesni_intel snd_hda_intel snd_intel_dspcfg snd_seq_midi crypto_simd snd_intel_sdw_acpi cryptd snd_hda_codec snd_seq_midi_event snd_rawmidi snd_hda_core snd_hwdep snd_seq fam15h_power k10temp snd_pcm snd_seq_device snd_timer snd mac_hid soundcore sch_fq_codel nct6775 hwmon_vid drm ip_tables x_tables autofs4 dm_mirror dm_region_hash dm_log hid_generic usbhid hid uas usb_storage r8169 crc32_pclmul realtek ahci xhci_pci i2c_piix4
[ 56.979521] xhci_pci_renesas libahci video
[ 56.979541] ---[ end trace cb8f6a346f18da7b ]---
Instead of finding MFD hotplugged device by its name, simply iterate
over the child devices to avoid the issue.
Squash in unused variable removal (Alex)
BugLink: https://bugs.launchpad.net/bugs/1920674
Fixes: 25030321ba
("drm/amd: add pm domain for ACP IP sub blocks")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:50:34 +02:00
..
2021-09-15 09:50:34 +02:00
2020-10-09 15:16:10 -04:00
2019-06-10 23:02:48 +02:00
2020-08-26 16:40:18 -04:00
2019-01-14 15:04:29 -05:00
2020-10-15 10:46:16 -07:00
2020-10-15 10:46:16 -07:00
2020-10-15 10:46:16 -07:00
2020-10-15 10:46:16 -07:00
2021-06-03 09:00:31 +02:00
2020-10-15 10:46:16 -07:00
2021-07-19 09:44:49 +02:00
2020-10-09 15:15:04 -04:00
2020-10-15 10:46:16 -07:00
2020-08-24 13:06:06 -04:00
2020-07-21 15:37:37 -04:00
2020-10-01 10:43:02 -04:00
2020-07-01 01:59:14 -04:00
2020-09-15 17:52:43 -04:00
2020-04-28 16:20:29 -04:00
2020-08-14 17:03:20 -04:00
2020-08-24 13:06:06 -04:00
2019-05-24 12:21:02 -05:00
2020-04-09 10:43:18 -04:00
2020-12-30 11:54:19 +01:00
2020-09-08 16:40:13 +10:00
2019-10-25 11:40:50 +02:00
2018-11-05 14:21:50 -05:00
2021-06-10 13:39:27 +02:00
2020-04-09 10:43:14 -04:00
2021-03-09 11:11:13 +01:00
2020-05-18 11:23:37 -04:00
2021-09-03 10:09:22 +02:00
2020-09-15 17:52:42 -04:00
2020-08-04 17:29:29 -04:00
2020-07-02 12:02:51 -04:00
2020-09-29 17:09:22 -04:00
2019-07-30 23:48:32 -05:00
2021-06-30 08:47:16 -04:00
2020-08-11 11:47:35 -04:00
2020-07-01 01:59:07 -04:00
2021-08-18 08:59:07 +02:00
2020-08-24 13:06:06 -04:00
2021-06-03 09:00:44 +02:00
2021-05-11 14:47:23 +02:00
2021-06-18 10:00:06 +02:00
2020-09-29 16:11:50 -04:00
2019-11-13 15:29:44 -05:00
2018-11-05 14:21:16 -05:00
2019-08-12 12:47:47 -05:00
2020-12-09 10:06:40 -05:00
2019-09-16 09:59:21 -05:00
2021-09-03 10:09:22 +02:00
2020-12-30 11:53:09 +01:00
2020-09-30 13:50:13 -04:00
2020-12-30 11:53:54 +01:00
2020-09-25 16:55:16 -04:00
2020-10-28 11:41:15 -06:00
2020-08-24 13:06:06 -04:00
2021-07-19 09:44:45 +02:00
2021-05-14 09:50:01 +02:00
2020-09-17 19:21:16 +02:00
2019-11-19 10:12:54 -05:00
2019-03-19 15:36:58 -05:00
2019-06-10 23:02:48 +02:00
2021-05-11 14:47:25 +02:00
2019-02-13 17:47:11 -05:00
2020-08-18 18:20:17 -04:00
2020-04-28 16:20:29 -04:00
2020-07-01 01:59:19 -04:00
2020-07-01 01:59:19 -04:00
2020-10-15 10:46:16 -07:00
2020-07-01 01:59:11 -04:00
2020-03-10 15:55:11 -04:00
2020-09-22 17:37:38 -04:00
2019-11-23 19:56:45 -04:00
2019-11-23 19:56:45 -04:00
2020-09-15 17:52:39 -04:00
2020-03-10 15:55:11 -04:00
2020-04-01 14:44:42 -04:00
2020-09-14 18:11:40 +02:00
2020-08-06 13:19:21 +10:00
2019-06-10 23:02:48 +02:00
2020-08-24 13:06:06 -04:00
2019-06-20 11:36:22 -05:00
2021-01-19 18:27:27 +01:00
2021-06-18 10:00:06 +02:00
2020-08-24 13:06:06 -04:00
2020-08-14 16:22:40 -04:00
2020-08-04 17:29:18 -04:00
2020-08-04 17:26:54 -04:00
2021-03-04 11:37:42 +01:00
2020-12-09 10:06:39 -05:00
2020-08-24 13:06:06 -04:00
2020-08-18 18:20:17 -04:00
2019-12-03 11:57:00 -05:00
2020-10-21 17:33:42 -04:00
2019-06-10 23:02:48 +02:00
2020-08-24 13:06:06 -04:00
2020-08-18 18:20:26 -04:00
2020-03-10 15:55:11 -04:00
2020-04-28 16:20:29 -04:00
2019-06-21 18:59:34 -05:00
2020-07-01 01:59:22 -04:00
2020-07-01 01:59:22 -04:00
2020-04-28 16:20:30 -04:00
2019-06-10 23:02:48 +02:00
2021-03-04 11:37:38 +01:00
2021-06-03 09:00:45 +02:00
2020-09-14 18:11:40 +02:00
2020-10-21 17:33:42 -04:00
2020-10-21 17:33:42 -04:00
2020-08-04 17:27:20 -04:00
2021-07-19 09:44:51 +02:00
2021-05-11 14:47:30 +02:00
2020-11-24 12:29:35 -05:00
2020-04-28 16:20:30 -04:00
2019-10-25 16:15:00 -04:00
2020-11-04 08:33:47 -05:00
2020-10-14 15:27:50 -04:00
2017-10-20 13:28:44 -04:00
2017-09-28 16:03:20 -04:00
2021-03-07 12:34:12 +01:00
2020-09-25 17:03:22 -04:00
2020-09-15 17:52:42 -04:00
2020-09-15 17:52:42 -04:00
2021-05-14 09:50:01 +02:00
2021-05-14 09:50:01 +02:00
2020-10-28 11:41:15 -06:00
2021-05-11 14:47:25 +02:00
2020-08-24 12:24:14 -04:00
2021-03-17 17:06:18 +01:00
2020-09-25 16:55:44 -04:00
2019-10-03 09:11:05 -05:00
2020-08-24 13:06:05 -04:00
2019-08-12 12:47:48 -05:00
2020-01-22 16:55:27 -05:00
2019-06-20 21:35:29 -05:00
2020-07-15 12:47:25 -04:00
2020-07-01 01:59:07 -04:00
2020-08-14 16:22:40 -04:00
2019-06-10 23:00:01 +02:00
2020-08-24 13:06:06 -04:00
2020-09-08 16:40:13 +10:00
2020-08-24 13:06:06 -04:00
2018-03-14 15:39:51 -05:00
2020-08-24 13:06:06 -04:00
2020-09-22 17:37:37 -04:00
2020-10-30 01:16:54 -04:00
2020-10-30 01:17:43 -04:00
2020-01-14 10:18:08 -05:00
2020-07-02 12:02:50 -04:00
2017-12-13 17:28:08 -05:00
2019-06-20 21:16:37 -05:00
2021-03-07 12:34:11 +01:00
2020-08-24 13:06:06 -04:00
2020-08-24 13:06:06 -04:00
2020-08-24 13:06:06 -04:00
2020-08-24 13:06:06 -04:00
2020-10-09 15:15:48 -04:00
2020-01-14 10:18:58 -05:00
2018-04-11 13:07:54 -05:00
2020-09-15 17:52:42 -04:00
2019-06-20 11:35:45 -05:00
2018-02-19 14:19:49 -05:00
2020-05-18 11:24:21 -04:00
2020-07-02 12:02:50 -04:00
2020-12-30 11:53:09 +01:00
2021-08-26 08:35:37 -04:00
2020-09-30 13:50:06 -04:00
2020-09-22 17:37:38 -04:00
2020-09-22 17:37:38 -04:00
2021-07-28 14:35:47 +02:00
2019-06-21 18:59:23 -05:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-09-30 13:50:13 -04:00
2020-08-04 17:29:28 -04:00
2020-08-24 12:22:56 -04:00
2020-08-24 12:22:56 -04:00
2020-09-30 13:53:21 -04:00
2020-08-26 16:40:18 -04:00
2020-09-30 13:50:13 -04:00
2019-06-20 21:35:29 -05:00
2021-03-07 12:34:11 +01:00
2020-10-14 15:27:50 -04:00
2019-11-19 10:12:49 -05:00
2021-06-03 09:00:31 +02:00
2019-11-19 10:12:50 -05:00
2021-06-10 13:39:23 +02:00
2019-11-19 10:12:50 -05:00
2021-06-10 13:39:23 +02:00
2020-07-01 01:59:09 -04:00
2019-12-11 15:22:08 -05:00
2020-08-14 16:22:41 -04:00
2020-07-01 01:59:11 -04:00
2020-09-22 17:37:37 -04:00
2019-07-08 13:56:02 -05:00
2020-09-25 16:55:16 -04:00
2020-08-14 16:22:40 -04:00
2020-09-25 16:55:16 -04:00
2020-08-14 16:22:40 -04:00
2020-09-25 16:55:16 -04:00
2020-08-14 16:22:40 -04:00
2019-12-18 16:33:26 -05:00
2020-03-06 14:34:42 -05:00
2020-07-15 12:45:05 -04:00
2020-09-15 17:24:18 -04:00
2020-04-24 11:42:11 -04:00
2020-09-15 17:24:18 -04:00
2020-04-24 11:42:11 -04:00
2019-04-19 11:33:27 -05:00
2020-04-01 14:44:43 -04:00
2020-09-03 14:47:48 -04:00
2019-06-20 21:35:30 -05:00
2019-10-03 09:11:05 -05:00
2020-04-28 15:58:12 -04:00
2019-10-03 09:11:05 -05:00
2019-10-03 09:11:05 -05:00
2020-07-01 01:59:07 -04:00
2019-09-13 17:11:03 -05:00
2020-04-01 14:44:42 -04:00
2019-09-13 17:11:03 -05:00
2020-04-01 14:44:42 -04:00
2019-09-13 17:11:03 -05:00
2020-08-14 16:12:22 -04:00
2019-09-13 17:11:03 -05:00
2021-03-09 11:11:12 +01:00
2020-07-02 12:02:50 -04:00
2020-05-14 16:42:43 -04:00
2018-06-15 12:20:42 -05:00
2021-01-27 11:55:02 +01:00
2021-06-18 10:00:06 +02:00
2018-02-19 14:18:31 -05:00
2020-05-22 13:41:53 -04:00
2018-02-19 14:18:31 -05:00
2021-06-18 10:00:06 +02:00
2018-08-27 11:10:34 -05:00
2021-08-04 12:46:41 +02:00
2019-08-12 12:47:50 -05:00
2020-06-03 13:52:04 -04:00
2020-04-28 16:20:29 -04:00
2020-04-28 16:20:29 -04:00
2021-07-19 09:44:57 +02:00
2021-05-26 12:06:53 +02:00
2020-06-03 13:52:04 -04:00
2021-06-03 09:00:45 +02:00
2020-06-03 13:52:04 -04:00
2020-04-28 16:20:29 -04:00
2020-07-02 12:02:50 -04:00
2020-07-01 01:59:24 -04:00
2020-09-15 17:52:43 -04:00
2018-02-19 14:18:08 -05:00
2020-07-02 12:02:50 -04:00
2020-06-03 13:52:00 -04:00
2020-08-14 16:22:41 -04:00
2020-07-21 15:37:49 -04:00
2020-07-01 01:59:24 -04:00
2021-05-26 12:06:53 +02:00
2020-07-02 12:02:50 -04:00
2020-05-14 16:42:43 -04:00
2020-08-14 16:22:39 -04:00
2020-04-30 16:48:27 -04:00
2018-11-06 14:02:41 -05:00
2021-03-07 12:34:11 +01:00
2019-10-03 09:11:01 -05:00
2019-10-03 09:11:01 -05:00
2020-07-23 10:45:00 -04:00
2019-12-11 15:22:07 -05:00
2021-07-19 09:44:51 +02:00
2020-07-27 16:23:00 -04:00
2020-11-24 12:30:37 -05:00
2020-07-01 01:59:24 -04:00
2020-09-22 17:37:38 -04:00
2020-09-22 17:37:38 -04:00
2021-06-10 13:39:27 +02:00
2020-09-22 17:37:38 -04:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-07-08 09:03:25 -04:00
2021-06-03 09:00:30 +02:00
2020-10-14 15:27:50 -04:00
2021-06-03 09:00:31 +02:00
2020-01-27 16:46:44 -05:00
2021-06-03 09:00:31 +02:00
2019-07-18 14:18:05 -05:00
2021-06-10 13:39:23 +02:00
2020-07-01 01:59:09 -04:00
2020-01-22 16:55:27 -05:00
2019-10-03 09:11:05 -05:00
2019-10-03 09:11:05 -05:00
2020-08-26 16:40:18 -04:00
2020-07-02 12:02:50 -04:00
2020-07-02 12:02:50 -04:00