Re: [PATCH v6 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests

2018-08-13 Thread Lyude Paul
On Mon, 2018-08-13 at 15:11 -0400, Ilia Mirkin wrote: > On Mon, Aug 13, 2018 at 3:07 PM, Lyude Paul wrote: > > +bool > > +nouveau_fbcon_hotplugged_in_suspend(struct nouveau_fbdev *fbcon) > > +{ > > + bool hotplug; > > + > > + if (!fbcon) > > + return false; > > + > > +

Re: [PATCH v6 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests

2018-08-13 Thread Ilia Mirkin
On Mon, Aug 13, 2018 at 3:07 PM, Lyude Paul wrote: > +bool > +nouveau_fbcon_hotplugged_in_suspend(struct nouveau_fbdev *fbcon) > +{ > + bool hotplug; > + > + if (!fbcon) > + return false; > + > + mutex_lock(&fbcon->hotplug_lock); > + hotplug = fbcon->hotplug_w

[PATCH v6 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests

2018-08-13 Thread Lyude Paul
I'm sure I don't need to tell you that fb_helper's locking is a mess. That being said; fb_helper's locking mess can seriously complicate the runtime suspend/resume operations of drivers because it can invoke atomic commits and connector probing from anywhere that calls drm_fb_helper_hotplug_event()