Re: [PATCH v2 0/2] drm/panel: Add device link in drm_panel_attach()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 28, 2018 at 01:09:28PM +0200, Jyri Sarha wrote:
> The device_link_del() is still there in drm_panel_detach(), despite
> Lukas Wunner's comment[1]. In the usual (currently all) cases things
> would work perfectly without the call too, because
> device_links_driver_cleanup() will eventually remove all orphaned
> links. However, this would cause an error in the situation where a drm
> device would like to detach a panel but remain operational, since the
> drm device would be unbound for no good reason if the detached panel
> is later unbound.

Okay, in that case I'd suggest dropping the DL_FLAG_AUTOREMOVE flag
and keep the device_link_del().  That gives you the flexibility to
detach a panel at runtime and drop the device link, but also have
the DRM driver unbound once the panel driver is unbound.

If you have things like optional panels that can be detached without
the necessity to unbind the DRM driver, you need something else instead
of or on top of device links.  Perhaps some kind of notifier block.
And perhaps two drm_panel_attach/detach() helpers in the DRM library,
one with device link and one with notifier.

As stated in the device links documentation, optional dependencies
are "beyond the scope of device links."

Thanks,

Lukas
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux