From: Lyude Paul <lyude@redhat.com>
To: "Li, Sun peng (Leo)" <Sunpeng.Li@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports
Date: Mon, 03 Jun 2019 15:25:07 -0400 [thread overview]
Message-ID: <c04bed17d1da34ee355f711283c68d0dc3e0da77.camel@redhat.com> (raw)
In-Reply-To: <a387faf3-2375-f7a8-1508-d7b4464ee2b3@amd.com>
On Thu, 2019-05-30 at 18:20 +0000, Li, Sun peng (Leo) wrote:
> 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.
eesh, you're right-somehow I didn't notice that. Guess we'll need some sort of
other fix then
>
> 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.
I'm reproducing this just by reloading i915 on a machine with some MST
displays connected. I uploaded a copy of the script that I use to do this
here:
https://people.freedesktop.org/~lyudess/archive/06-03-2019/unloadgpumod.sh
Given a module (in this case drm.ko), it will go through and unload all of the
modules depending on it, then drm.ko, then reload.
>
> Thanks,
> Leo
>
> > > +
> > > + drm_dp_aux_register_devnode(&port->aux);
> > > }
--
Cheers,
Lyude Paul
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-06-03 19:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-16 15:17 [PATCH 0/7] Add DP MST AUX devices sunpeng.li-5C7GfCeVMHo
2019-05-16 15:17 ` [PATCH 1/7] drm/dp: Use non-cyclic idr sunpeng.li
[not found] ` <1558019883-12397-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-05-16 15:17 ` [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports sunpeng.li-5C7GfCeVMHo
[not found] ` <1558019883-12397-3-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-05-16 21:40 ` Lyude Paul
[not found] ` <3e237f325a98b044231661886329a808d6701146.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-05-30 18:20 ` Li, Sun peng (Leo)
2019-06-03 19:25 ` Lyude Paul [this message]
2019-06-03 19:28 ` Lyude Paul
2019-06-06 19:41 ` Li, Sun peng (Leo)
[not found] ` <1acd58fd-a5e8-0f07-709a-902ea67ba760-5C7GfCeVMHo@public.gmane.org>
2019-06-06 21:07 ` Lyude Paul
2019-06-27 22:21 ` Li, Sun peng (Leo)
[not found] ` <f800b501-422e-c7fb-ebce-bd0e1717d2b2-5C7GfCeVMHo@public.gmane.org>
2019-07-01 20:43 ` Lyude Paul
2019-05-16 15:17 ` [PATCH 3/7] drm/dp-mst: Use connector kdev as aux device parent sunpeng.li-5C7GfCeVMHo
[not found] ` <1558019883-12397-4-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-05-16 20:23 ` Lyude Paul
2019-05-16 21:30 ` Lyude Paul
2019-05-16 15:18 ` [PATCH 4/7] drm/sysfs: Add mstpath attribute to connector devices sunpeng.li-5C7GfCeVMHo
2019-05-16 15:18 ` [PATCH 7/7] drm/nouveau: Use connector kdev as aux device parent sunpeng.li-5C7GfCeVMHo
[not found] ` <1558019883-12397-8-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-05-16 21:40 ` Lyude Paul
2019-05-16 19:54 ` [PATCH 0/7] Add DP MST AUX devices Lyude Paul
2019-05-16 20:18 ` Lyude Paul
[not found] ` <2248d762446e824def09699f0ef719b9c90d0dbc.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-05-16 20:21 ` Li, Sun peng (Leo)
2019-05-16 15:18 ` [PATCH 5/7] drm/amd/display: Use connector kdev as aux device parent sunpeng.li
2019-05-16 17:21 ` Kazlauskas, Nicholas
2019-05-16 15:18 ` [PATCH 6/7] drm/bridge/analogix-anx78xx: " sunpeng.li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c04bed17d1da34ee355f711283c68d0dc3e0da77.camel@redhat.com \
--to=lyude@redhat.com \
--cc=Sunpeng.Li@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox