[PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports
Li, Sun peng (Leo)
Sunpeng.Li at amd.com
Thu Jun 6 19:41:09 UTC 2019
On 2019-06-03 3:28 p.m., Lyude Paul wrote:
>> 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
> oops-almost forgot to mention. The argument you pass to make it reload instead
> of just unloading is --reload
Thanks for the script!
So, the warning has to do with:
1. Having the aux device as a child of connector device, and
2. During driver unload, drm_connector_unregister() is called before
Which means that connector_unregister() will recursively remove the
child aux device, before put_port() can properly unregister it. Any
further attempts to remove after the first will throw a "not found" warning.
Call-stacks for reference:
A solution is to unregister the aux device immediately before the
connector device is unregistered - if we are to keep the aux device as a
child. Following current scheme with SST, it looks like
drm_connector_funcs->early_unregister() is the right place to do so.
To keep the balance, aux registration will then happen in
drm_connector_funcs->late_register(). This will leave the SDP
transaction handling part in DRM still, but pass the responsibility of
creating and removing remote (fake) aux devices to the driver.
I have a WIP patch here for you to take a look. It should apply on top
of the existing patchset:
I'd like to hear your thoughts, before I go and modify other drivers :)
More information about the amd-gfx