]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: imx-drm-core: fix buggy component registration
authorLothar Waßmann <LW@KARO-electronics.de>
Wed, 13 Aug 2014 13:13:14 +0000 (15:13 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 13 Aug 2014 13:13:14 +0000 (15:13 +0200)
commitc11498039ab465d11bfc3f931646f6d9ae94ae9d
tree9845f36ca99b98ba943dfa434e1937501e2406ab
parent3d1c688753e4b440e76693eb6c8d598c9003df0c
staging: imx-drm-core: fix buggy component registration

Currently the imx-drm-core driver builds up a list of device nodes
found via the 'ports' property in DT. The DRM subsystem builds a
similar list of all drivers for the individual display-subsystem
components (crtc, ldb, ...) via the component_add() call.

The ldb driver presents a special case, since it supports two channels
which are represented in DT as two separate nodes.
When both LVDS channels are enabled, the component list in the
imx-drm-core driver will contain one element more than the component
list in the DRM subsystem. Thus, the DRM subsystem will never reach
the state in which all components are assembled and won't ever
initialize the display-subsystem.

Rather than registering all device nodes found in DT and handling the
'lvds-channel' special case in imx_drm_add_components() which is
called by the DRM subsystem once for each component added there, do it
in imx_drm_add_component(), which builds up the list of components in
the imx-drm-core driver.

This way both lists will have a matching number of entries and the DRM
subsystem will be properly initialized.
drivers/staging/imx-drm/imx-drm-core.c