Hey, sorry for my late response! On 2019-05-16 5:40 p.m., Lyude Paul wrote: >> if (old_pdt != port->pdt && !port->input) { >> @@ -1220,6 +1268,8 @@ static void drm_dp_add_port(struct drm_dp_mst_branch >> *mstb, >> drm_connector_set_tile_property(port->connector); >> } >> (*mstb->mgr->cbs->register_connector)(port->connector); > This is wrong: we always want to setup everything in the connector first > before trying to register it, not after. Otherwise, things explode like so: **snip** > [ 452.424461] ------------[ cut here ]------------ > [ 452.424464] sysfs group 'power' not found for kobject 'drm_dp_aux5' > [ 452.424471] WARNING: CPU: 3 PID: 1887 at fs/sysfs/group.c:256 sysfs_remove_group+0x76/0x80 > [ 452.424473] Modules linked in: vfat fat elan_i2c i915(O) intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel iTCO_wdt kvm mei_wdt irqbypass iTCO_vendor_support crct10dif_pclmul wmi_bmof intel_wmi_thunderbolt crc32_pclmul i2c_algo_bit ghash_clmulni_intel intel_cstate drm_kms_helper(O) intel_uncore intel_rapl_perf btusb btrtl btbcm syscopyarea btintel sysfillrect sysimgblt fb_sys_fops bluetooth drm(O) joydev mei_me idma64 ucsi_acpi thunderbolt ecdh_generic i2c_i801 intel_xhci_usb_role_switch processor_thermal_device typec_ucsi intel_lpss_pci intel_soc_dts_iosf mei roles intel_lpss typec intel_pch_thermal wmi thinkpad_acpi ledtrig_audio rfkill int3403_thermal int340x_thermal_zone int3400_thermal acpi_thermal_rel acpi_pad video pcc_cpufreq crc32c_intel nvme serio_raw uas e1000e nvme_core usb_storage i2c_dev > [ 452.424492] CPU: 3 PID: 1887 Comm: unloadgpumod Tainted: G O 5.1.0Lyude-Test+ #1 > [ 452.424494] Hardware name: LENOVO 20L8S2N800/20L8S2N800, BIOS N22ET35W (1.12 ) 04/09/2018 > [ 452.424496] RIP: 0010:sysfs_remove_group+0x76/0x80 > [ 452.424498] Code: 48 89 df 5b 5d 41 5c e9 f8 bc ff ff 48 89 df e8 d0 bc ff ff eb cb 49 8b 14 24 48 8b 75 00 48 c7 c7 08 a5 0c aa e8 44 00 d6 ff <0f> 0b 5b 5d 41 5c c3 0f 1f 00 0f 1f 44 00 00 48 85 f6 74 31 41 54 > [ 452.424500] RSP: 0018:ffffa8bb81b5fb28 EFLAGS: 00010282 > [ 452.424501] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006 > [ 452.424502] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff981fde2d5a00 > [ 452.424503] RBP: ffffffffa9ea12e0 R08: 0000000000000792 R09: 0000000000000046 > [ 452.424504] R10: 0000000000000727 R11: ffffa8bb81b5f9d0 R12: ffff981fd5f77010 > [ 452.424505] R13: ffff981fd6ebbedc R14: dead000000000200 R15: dead000000000100 > [ 452.424507] FS: 00007f8cc1d8c740(0000) GS:ffff981fde2c0000(0000) knlGS:0000000000000000 > [ 452.424508] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 452.424509] CR2: 000055b19d079a08 CR3: 000000043b2a0002 CR4: 00000000003606e0 > [ 452.424510] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > [ 452.424511] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > [ 452.424512] Call Trace: > [ 452.424516] device_del+0x75/0x360 > [ 452.424518] ? class_find_device+0x96/0xf0 > [ 452.424520] device_unregister+0x16/0x60 > [ 452.424521] device_destroy+0x3a/0x40 > [ 452.424525] drm_dp_aux_unregister_devnode+0xea/0x180 [drm_kms_helper] > [ 452.424534] ? drm_dbg+0x87/0x90 [drm] > [ 452.424538] drm_dp_mst_topology_put_port+0x5b/0x110 [drm_kms_helper] > [ 452.424543] drm_dp_mst_topology_put_mstb+0xb6/0x180 [drm_kms_helper] > [ 452.424547] drm_dp_mst_topology_mgr_set_mst+0x233/0x2b0 [drm_kms_helper] > [ 452.424551] drm_dp_mst_topology_mgr_destroy+0x18/0xa0 [drm_kms_helper] > [ 452.424571] intel_dp_encoder_flush_work+0x32/0xb0 [i915] > [ 452.424592] intel_ddi_encoder_destroy+0x32/0x70 [i915] > [ 452.424600] drm_mode_config_cleanup+0x51/0x2e0 [drm] > [ 452.424621] intel_modeset_cleanup+0xc8/0x140 [i915] > [ 452.424633] i915_driver_unload+0xa8/0x130 [i915] > [ 452.424645] i915_pci_remove+0x1e/0x40 [i915] > [ 452.424647] pci_device_remove+0x3b/0xc0 > [ 452.424649] device_release_driver_internal+0xe4/0x1d0 > [ 452.424651] pci_stop_bus_device+0x69/0x90 > [ 452.424653] pci_stop_and_remove_bus_device_locked+0x16/0x30 > [ 452.424655] remove_store+0x75/0x90 > [ 452.424656] kernfs_fop_write+0x116/0x190 > [ 452.424658] vfs_write+0xa5/0x1a0 > [ 452.424660] ksys_write+0x57/0xd0 > [ 452.424663] do_syscall_64+0x55/0x150 > [ 452.424665] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > [ 452.424667] RIP: 0033:0x7f8cc1e7d038 > [ 452.424668] Code: 89 02 48 c7 c0 ff ff ff ff eb b3 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 e5 76 0d 00 8b 00 85 c0 75 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 41 54 49 89 d4 55 > [ 452.424670] RSP: 002b:00007ffce4321218 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 > [ 452.424672] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f8cc1e7d038 > [ 452.424673] RDX: 0000000000000002 RSI: 000056515aefbf00 RDI: 0000000000000001 > [ 452.424674] RBP: 000056515aefbf00 R08: 000000000000000a R09: 00007f8cc1f0ee80 > [ 452.424675] R10: 000000000000000a R11: 0000000000000246 R12: 00007f8cc1f50780 > [ 452.424676] R13: 0000000000000002 R14: 00007f8cc1f4b740 R15: 0000000000000002 > [ 452.424678] WARNING: CPU: 3 PID: 1887 at fs/sysfs/group.c:256 sysfs_remove_group+0x76/0x80 > [ 452.424680] ---[ end trace a1c11eaf054910a3 ]--- **snip** > > So, we need to move the drm_dp_aux_register_devnode() call above the connector > registration callback. Same goes for the port->aux.dev = port->connector- >> kdev; assignment that you do in patch 3/7 (and of course, you can remove the > connector registration status check there now). Hmm, I don't think that will quite work for the purpose of the series. If I register the aux device before the connector's, I wouldn't be able to set the connector's kdev as parent. The udev rules depend on this hierarchy to generate the symlinks we want - it reads the parent connector's attrs. How are you reproducing this? I can try debugging this on an intel system. It looks like there's an expected 'power' attribute group that's missing when unregistering the aux device - I wonder where that gets attached. Thanks, Leo > >> + >> + drm_dp_aux_register_devnode(&port->aux); >> } _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx