mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Redfearn <matt.redfearn@thinci.com>
To: Andrzej Hajda <a.hajda@samsung.com>,
	John Stultz <john.stultz@linaro.org>
Cc: 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>,
	David Airlie <airlied@linux.ie>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Matthew Redfearn <matthew.redfearn@thinci.com>,
	Sean Paul <seanpaul@chromium.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH v2] drm/bridge: adv7511: Attach to DSI host at probe time
Date: Thu, 29 Aug 2019 13:55:58 +0000	[thread overview]
Message-ID: <83dbc355-790a-3940-9fc3-fa9567d4c3bf@thinci.com> (raw)
In-Reply-To: <7b7736ed-6cf1-d7ab-ae03-83b70b351261@samsung.com>



On 28/08/2019 08:05, Andrzej Hajda wrote:
> On 27.08.2019 22:03, John Stultz wrote:
>> On Mon, Aug 19, 2019 at 3:27 PM John Stultz <john.stultz@linaro.org> wrote:
>>> On Thu, Jun 27, 2019 at 8:18 AM Matt Redfearn <matt.redfearn@thinci.com> 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>
>>>>
>>>> ---
>>> As a heads up, I just did some testing on drm-misc-next and this patch
>>> seems to be breaking the HiKey board.  On bootup, I'm seeing:
>>> [    4.209615] adv7511 2-0039: 2-0039 supply avdd not found, using
>>> dummy regulator
>>> [    4.217075] adv7511 2-0039: 2-0039 supply dvdd not found, using
>>> dummy regulator
>>> [    4.224453] adv7511 2-0039: 2-0039 supply pvdd not found, using
>>> dummy regulator
>>> [    4.231804] adv7511 2-0039: 2-0039 supply a2vdd not found, using
>>> dummy regulator
>>> [    4.239242] adv7511 2-0039: 2-0039 supply v3p3 not found, using
>>> dummy regulator
>>> [    4.246615] adv7511 2-0039: 2-0039 supply v1p2 not found, using
>>> dummy regulator
>>> [    4.272970] adv7511 2-0039: failed to find dsi host
>>>
>>> over and over.  The dummy regulator messages are normal, but usually
>>> [    4.444315] kirin-drm f4100000.ade: bound f4107800.dsi (ops dsi_ops)
>>>
>>> Starts up right afterward.
>> Hey Matt, Andrzej,
>>    I just wanted to follow up on this as this patch is breaking a
>> couple of boards. Any sense of what might be missing, or is this
>> something we should revert?
>>
>> I'm happy to test any patch ideas you have.
> 
> 
> I guess this is circular dependency issue:
> 
> - adv waits for dsi-host, then it creates drm_bridge,
> 
> - dsi-driver waits for drm_bridge, then it creates dsi host.
> 
> 
> The patch introduces proper order:
> 
> - 1st we should register devices buses,
> 
> - then we should wait for drm components.
> 
> 
> So the best solution would be to fix f4107800.dsi driver - it shouldn't
> look for drm_bridge in probe, instead it should register dsi_host, and
> in dsi host attach callback look for drm_bridge, then call component_add
> (if all required resources are gathered), see
> dw_mipi_dsi_rockchip_host_attach for example.

Hi all,

Sorry that my patch seems to have broken things. It was using the 
generic synopsys dsi driver 
(drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c) that I found the 
circular dependency fixed by my patch.

It appears that the patch has broken things for the platform specific 
synopsys dsi driver for Kirin. So another approach (though a lot more 
work) would be to switch Kirin over to using the generic synopsys dsi 
driver so that we have less redundancy in the tree.

Thanks,
Matt

> 
> 
> Regards
> 
> Andrzej
> 
> 
> 
>>
>> thanks
>> -john
>>
>>
> 

      reply	other threads:[~2019-08-29 14:03 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
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 [this message]

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=83dbc355-790a-3940-9fc3-fa9567d4c3bf@thinci.com \
    --to=matt.redfearn@thinci.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=john.stultz@linaro.org \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.redfearn@thinci.com \
    --cc=narmstrong@baylibre.com \
    --cc=sam@ravnborg.org \
    --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®