From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Tony Lindgren <tony@atomide.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sebastian Reichel <sre@kernel.org>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org
Subject: Re: [PATCH] drm/omap: dsi: Fix deferred probe warnings
Date: Wed, 13 Sep 2023 15:02:28 +0300 [thread overview]
Message-ID: <0cd10461-aff1-9302-3d36-dd2ba609195a@ideasonboard.com> (raw)
In-Reply-To: <20230913073755.GE5285@atomide.com>
On 13/09/2023 10:37, Tony Lindgren wrote:
> * Laurent Pinchart <laurent.pinchart@ideasonboard.com> [230412 11:59]:
>> On Wed, Apr 12, 2023 at 11:55:34AM +0300, Tomi Valkeinen wrote:
>>> On 12/04/2023 11:50, Laurent Pinchart wrote:
>>>> Hi Tony,
>>>>
>>>> Thank you for the patch.
>>>>
>>>> On Wed, Apr 12, 2023 at 10:39:53AM +0300, Tony Lindgren wrote:
>>>>> We may not have dsi->dsidev initialized during probe, and that can
>>>>> lead into various dsi related warnings as omap_dsi_host_detach() gets
>>>>> called with dsi->dsidev set to NULL.
>>>>>
>>>>> The warnings can be "Fixed dependency cycle(s)" followed by a
>>>>> WARNING: CPU: 0 PID: 787 at drivers/gpu/drm/omapdrm/dss/dsi.c:4414.
>>>>
>>>> How can this happen ? I assume .detach() can't be called without a
>>>> priori successful call to .attach(), that that sets dsi->dsidev.
>>>
>>> I had a quick look, and the driver calls mipi_dsi_host_register() in
>>> probe, and mipi_dsi_host_unregister() in remove.
>>>
>>> mipi_dsi_host_unregister() always calls mipi_dsi_detach(), but I don't
>>> think mipi_dsi_host_register() always calls attach, which happens later
>>> when the peripheral probes.
>>
>> Is this something that should be addressed in the DRM MIPI DSI helpers,
>> to only detach after an attach ?
>
> Tomi, any comments on detach after attach?
I sent a comment to the patch.
As Laurent said, I think this really should be fixed in the framework
side. Calling detach in drivers without attach feels just plain wrong.
However, I don't see any harm in the patch (but perhaps some changes
needed as per my comments), and it will fix the issue for omapdrm, until
someone has the time and energy to look at a real fix.
Tomi
next prev parent reply other threads:[~2023-09-13 12:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 7:39 [PATCH] drm/omap: dsi: Fix deferred probe warnings Tony Lindgren
2023-04-12 8:50 ` Laurent Pinchart
2023-04-12 8:55 ` Tomi Valkeinen
2023-04-12 8:59 ` Laurent Pinchart
2023-09-13 7:37 ` Tony Lindgren
2023-09-13 12:02 ` Tomi Valkeinen [this message]
2023-04-12 9:00 ` H. Nikolaus Schaller
2023-09-13 11:59 ` Tomi Valkeinen
2023-09-13 12:50 ` Tony Lindgren
2023-09-16 12:50 ` H. Nikolaus Schaller
2023-09-18 3:48 ` Tony Lindgren
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=0cd10461-aff1-9302-3d36-dd2ba609195a@ideasonboard.com \
--to=tomi.valkeinen@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=sre@kernel.org \
--cc=tony@atomide.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