drm/vc4: Set up the DSI host at pdev probe time, not component bind.
authorEric Anholt <eric@anholt.net>
Tue, 15 Aug 2017 23:47:20 +0000 (16:47 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 27 Sep 2017 18:54:56 +0000 (11:54 -0700)
commit32ad958d85b92ee7068aa1de5917777be080cc3c
tree49170b66d2ef3923ab6c5cf6af993801ea698634
parentaf2eca53206c59ce9308a4f5f46c4a104a179b6b
drm/vc4: Set up the DSI host at pdev probe time, not component bind.

We need the following things to happen in sequence:

DSI host creation
DSI device creation in the panel driver (needs DSI host)
DSI device attach from panel to host.
DSI drm_panel_add()
DSI encoder creation
DSI encoder's DRM panel/bridge attach

Unless we allow device creation while the host isn't up yet, we need
to break the -EPROBE_DEFER deadlock between the panel driver looking
up the host and the host driver looking up the panel.  We can do so by
moving the DSI host creation outside of the component bind loop, and
the panel/bridge lookup/attach into the component bind process.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20170815234722.20700-3-eric@anholt.net
Reviewed-by: Archit Taneja <architt@codeaurora.org>
drivers/gpu/drm/vc4/vc4_dsi.c