[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2bf56c04-733b-24a5-a344-166a94cd51f7@ideasonboard.com>
Date: Wed, 12 Apr 2023 11:55:34 +0300
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Tony Lindgren <tony@...mide.com>
Cc: David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Sebastian Reichel <sre@...nel.org>,
dri-devel@...ts.freedesktop.org, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/omap: dsi: Fix deferred probe warnings
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.
Tomi
>> Let's fix the warnings by checking for a valid dsi->dsidev.
>>
>> Signed-off-by: Tony Lindgren <tony@...mide.com>
>> ---
>> drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
>> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
>> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
>> @@ -4411,7 +4411,7 @@ static int omap_dsi_host_detach(struct mipi_dsi_host *host,
>> {
>> struct dsi_data *dsi = host_to_omap(host);
>>
>> - if (WARN_ON(dsi->dsidev != client))
>> + if (dsi->dsidev && WARN_ON(dsi->dsidev != client))
>> return -EINVAL;
>>
>> cancel_delayed_work_sync(&dsi->dsi_disable_work);
>
Powered by blists - more mailing lists