From: Andrzej Hajda <a.hajda@samsung.com>
To: Matt Redfearn <matt.redfearn@thinci.com>,
Archit Taneja <architt@codeaurora.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@siol.net>,
Thierry Reding <thierry.reding@gmail.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Matthew Redfearn <matthew.redfearn@thinci.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
David Airlie <airlied@linux.ie>,
Sean Paul <seanpaul@chromium.org>,
Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH v2] drm/bridge: adv7511: Attach to DSI host at probe time
Date: Mon, 1 Jul 2019 12:36:46 +0200 [thread overview]
Message-ID: <a68a3c20-b3a0-7d0e-6a2e-28649bf9effc@samsung.com> (raw)
In-Reply-To: <20190627151740.2277-1-matt.redfearn@thinci.com>
On 27.06.2019 17:18, Matt Redfearn wrote:
> In contrast to all of the DSI panel drivers in drivers/gpu/drm/panel
> which attach to the DSI host via mipi_dsi_attach() at probe time, the
> ADV7533 bridge device does not. Instead it defers this to the point that
> the upstream device connects to its bridge via drm_bridge_attach().
> The generic Synopsys MIPI DSI host driver does not register it's own
> drm_bridge until the MIPI DSI has attached. But it does not call
> drm_bridge_attach() on the downstream device until the upstream device
> has attached. This leads to a chicken and the egg failure and the DRM
> pipeline does not complete.
> Since all other mipi_dsi_device drivers call mipi_dsi_attach() in
> probe(), make the adv7533 mipi_dsi_device do the same. This ensures that
> the Synopsys MIPI DSI host registers it's bridge such that it is
> available for the upstream device to connect to.
>
> Signed-off-by: Matt Redfearn <matt.redfearn@thinci.com>
Queued to drm-misc-next.
Regards
Andrzej
>
> ---
>
> Changes in v2:
> Cleanup if adv7533_attach_dsi fails.
>
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index e7ddd3e3db9..807827bd910 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -874,9 +874,6 @@ 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);
> @@ -1222,8 +1219,17 @@ 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)
next prev parent reply other threads:[~2019-07-01 10:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190627151810epcas2p14661fda980f479627c6beb501f52bfb2@epcas2p1.samsung.com>
2019-06-27 15:18 ` Matt Redfearn
2019-07-01 10:36 ` Andrzej Hajda [this message]
2019-08-19 22:27 ` John Stultz
2019-08-21 17:38 ` John Stultz
2019-08-27 20:03 ` John Stultz
2019-08-28 7:05 ` Andrzej Hajda
2019-08-29 13:55 ` Matt Redfearn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a68a3c20-b3a0-7d0e-6a2e-28649bf9effc@samsung.com \
--to=a.hajda@samsung.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=architt@codeaurora.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.redfearn@thinci.com \
--cc=matthew.redfearn@thinci.com \
--cc=narmstrong@baylibre.com \
--cc=seanpaul@chromium.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®