]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i2c: tda998x: mali-dp: hdlcd: refactor connector registration
authorBrian Starkey <brian.starkey@arm.com>
Mon, 24 Oct 2016 14:27:59 +0000 (15:27 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Mon, 31 Oct 2016 12:04:54 +0000 (12:04 +0000)
commit90731c24d2db7ec04df43ddbcee9605183d05187
tree982261902f96f5cd9edd7f8358602c8ecbbc9cae
parentc8d2bc9bc39ebea8437fd974fdbc21847bb897a3
drm/i2c: tda998x: mali-dp: hdlcd: refactor connector registration

Connectors shouldn't be registered until the rest of the whole device
is set up, so that consistent state is presented to userspace.

As such, remove the calls to drm_connector_register() and
drm_connector_unregister() from tda998x, as these are now handled by
drm_dev_(un)register() itself.

To work with this change, the mali-dp and hdlcd bind and unbind
sequences have to be reordered, to ensure that the componentised
encoder/connector is bound before drm_dev_register() registers all
connectors. Similarly, the device must be unregistered before the
component is unbound.

Altogether, this allows other drivers using tda998x to be
de-midlayered, and to have less racy initialisation of their components.

Splitting this commit into three (one per driver) isn't possible without
intermediate breakage, so it is all squashed together here.

Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/gpu/drm/arm/hdlcd_drv.c
drivers/gpu/drm/arm/malidp_drv.c
drivers/gpu/drm/i2c/tda998x_drv.c