* [PATCH] Revert "drm/bridge: adv7511: Attach to DSI host at probe time"
@ 2019-08-29 18:08 ` Rob Clark
2019-09-13 8:25 ` Andrzej Hajda
0 siblings, 1 reply; 2+ messages in thread
From: Rob Clark @ 2019-08-29 18:08 UTC (permalink / raw)
To: dri-devel
Cc: Matt Redfearn, Andrzej Hajda, Rob Clark, Neil Armstrong,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec, David Airlie,
Daniel Vetter, Sam Ravnborg, Thomas Gleixner, open list
From: Rob Clark <robdclark@chromium.org>
This reverts commit 83f35bc3a852f1c3892c7474998c5cec707c7ba3.
This commit the wrong direction, we should really be changing panel
framework to attach dsi host after probe, rather than introducing
the same probe-order problem that panels already have to bridges.
The reason is, that in order to deal with devices where display is
enabled by bootloader and efifb/simplefb is used until the real
driver probes, we need to be careful to not touch the hardware
until we have all the pieces probed and ready to go, otherwise you
will kill the working display, leaving yourself (at least, in the
case of real consumer devices that do not have a debug UART) with
no good way to debug what went wrong.
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 98bccace8c1c..f6d2681f6927 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -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);
@@ -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)
--
2.21.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Revert "drm/bridge: adv7511: Attach to DSI host at probe time"
2019-08-29 18:08 ` [PATCH] Revert "drm/bridge: adv7511: Attach to DSI host at probe time" Rob Clark
@ 2019-09-13 8:25 ` Andrzej Hajda
0 siblings, 0 replies; 2+ messages in thread
From: Andrzej Hajda @ 2019-09-13 8:25 UTC (permalink / raw)
To: Rob Clark, dri-devel
Cc: Matt Redfearn, Rob Clark, Neil Armstrong, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
Sam Ravnborg, Thomas Gleixner, open list
On 29.08.2019 20:08, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> This reverts commit 83f35bc3a852f1c3892c7474998c5cec707c7ba3.
>
> This commit the wrong direction, we should really be changing panel
> framework to attach dsi host after probe, rather than introducing
> the same probe-order problem that panels already have to bridges.
>
> The reason is, that in order to deal with devices where display is
> enabled by bootloader and efifb/simplefb is used until the real
> driver probes, we need to be careful to not touch the hardware
> until we have all the pieces probed and ready to go, otherwise you
> will kill the working display, leaving yourself (at least, in the
> case of real consumer devices that do not have a debug UART) with
> no good way to debug what went wrong.
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
Applied to drm-misc-next-fixes, with changed commit message - I hope it
is OK for you.
Regards
Andrzej
> ---
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 98bccace8c1c..f6d2681f6927 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -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);
> @@ -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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-13 8:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20190829181055epcas3p3ee33cfe662517555ff0c1ce456757e7c@epcas3p3.samsung.com>
2019-08-29 18:08 ` [PATCH] Revert "drm/bridge: adv7511: Attach to DSI host at probe time" Rob Clark
2019-09-13 8:25 ` Andrzej Hajda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome