On Mon, May 30, 2016 at 10:49:43AM +0200, Daniel Vetter wrote: > On Fri, May 27, 2016 at 03:00:35PM +0100, Chris Wilson wrote: > > If a driver wants to more precisely control its initialisation and in > > particular, defer registering its interfaces with userspace until after > > everything is setup, it also needs to defer registering the connectors. > > As some devices need more work during registration, add a callback so > > that drivers can do additional work if required for a connector. > > > > Correspondingly, we also require an unregister callback. > > > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > Cc: Daniel Vetter <daniel.vetter@xxxxxxxx> > > Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx > > Smells a bit too much like midlayer too me ;-) Imo perfectly fine to have > a driver loop besides the register_all which registers stuff like > backlights and similar things. But otoh this is a bit a high-grade > bikeshed ... We either: intel_connector_register() { drm_connector_register() intel_connector->register(); } intel_connector_unregister() { intel_connector->unregister(); drm_connector_unregister() } or drm_connector_register() { /*blah*/ connector->func->register(); } drm_connector_unregister() { connector->func->unregister(); /*blah*/ } We still get to drive the registration (hence why it doesn't smell too much like midlayer just a vfunc wrapper), just the second is a tad more generic and we aren't the only ones who require the calback. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx