Skip to content

Commit

Permalink
Revert "drm/bridge: adv7511: Attach to DSI host at probe time"
Browse files Browse the repository at this point in the history
This reverts commit 83f35bc.

There are at least two DSI controller drivers which relies on the old
behaviour of adv7511 driver. To avoid platform breakage this patch
should be reverted. This is a temporary solution, as it blocks adv7511
usage with other platforms.
Assumption that DSI device driver (bridge/panel) should first expose
drm_bridge/drm_panel object, then look for DSI bus is just incorrect -
it can work with devices controlled via i2c but it cannot work with
devices controlled via DSI - they will not be able to probe.
To solve the issue following steps should be performed:
- rework reverted patch allowing co-operation with broken DSI controller
  drivers - with simple/ugly workaround,
- fix controller drivers and then remove workaround.

Signed-off-by: Rob Clark <robdclark@chromium.org>
[a.hajda: changed commit message]
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190829180836.14453-1-robdclark@gmail.com
  • Loading branch information
Rob Clark authored and Andrzej Hajda committed Sep 13, 2019
1 parent 88537dd commit 2472518
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,9 @@ static int adv7511_bridge_attach(struct drm_bridge *bridge)
&adv7511_connector_helper_funcs);
drm_connector_attach_encoder(&adv->connector, bridge->encoder);

if (adv->type == ADV7533)
ret = adv7533_attach_dsi(adv);

if (adv->i2c_main->irq)
regmap_write(adv->regmap, ADV7511_REG_INT_ENABLE(0),
ADV7511_INT0_HPD);
Expand Down Expand Up @@ -1219,17 +1222,8 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
drm_bridge_add(&adv7511->bridge);

adv7511_audio_init(dev, adv7511);

if (adv7511->type == ADV7533) {
ret = adv7533_attach_dsi(adv7511);
if (ret)
goto err_remove_bridge;
}

return 0;

err_remove_bridge:
drm_bridge_remove(&adv7511->bridge);
err_unregister_cec:
i2c_unregister_device(adv7511->i2c_cec);
if (adv7511->cec_clk)
Expand Down

0 comments on commit 2472518

Please sign in to comment.