Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3415134rdb; Wed, 13 Sep 2023 11:14:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFw4kcd4gdqZSpNMAH2+wVKvmhxW0AsrBLowH4Y/Mzn1tMScVkBWeyNuwBY7kPxHaSc/RRg X-Received: by 2002:a05:6a00:39a5:b0:68f:c7c5:a73a with SMTP id fi37-20020a056a0039a500b0068fc7c5a73amr3458379pfb.16.1694628885808; Wed, 13 Sep 2023 11:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694628885; cv=none; d=google.com; s=arc-20160816; b=yHQwvvQJBfwDm4rQ7RiWBw3bLCsk0oGqg5uEMITwG0RV0nJ1dFVu5Ely4xBtsqRl29 H+0XcBRIs4a6kWVuA2lyISazXOCV6v+4bNbk4FRwXBE2zO/pvmBSLmFBJhFaZF1if+Be OLLkURMIpbLO4EePtlS2WPoYIs8eaSEMu4b7sNHuZEkA/OgZUu2I9r70cN2UJ2Ou2LIM xpGDIxncMjA+1RJbBWDd7yy5Z4v7SFljuFBopPKG1ofcIlG10vIKqiwx7CzlDnap1lXc VAIZjd0kDgsk+nT7D+yKU3Xiotc45s6vCDvicPn4AW32fQno3QD9tDzVyD1cJwYklj6a 5iPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hbOPKSptTioFBeTD4ecyDDr3kGYJ0suxknoxDA0MWXM=; fh=JcaqSgeIW36KP3Lbv1HpXmJhBOWLQtTLzqvOt6KFPWk=; b=Z2+pjwsTLRM09cgKrwJHPOmk7wiYpkQk54YcEMWgSo0jX3YUWsxgC3Oqq+73z4I2n0 8Ix+clGuLv2k4oEijYtTSgfPj/f01p0zHKwgNRQk2gnlJaqT69fg0KJaM7A07blbu0Pz LcGyn0i8mjAO7enUGdFJVLbGI5abdFHV1qaa+KQ6q5jTOXU4PsnJYI+hDMitWBDdra9q yO8W/VLNLheHs8whGPbmAvYRIiZTnXFWVMJH74/UQfZnBRK5OvtUEz4xxdUgA7kwIrhO ulUNdn7+igcyHySyMT1bXyxBR3zhxCCU1YbT5BqxkK0L65ownkgntCqOm9P6BCSZTE74 EU/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=D0s47RcR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id bs67-20020a632846000000b00565f7784bc9si10128840pgb.186.2023.09.13.11.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 11:14:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=D0s47RcR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 68EE782B5175; Wed, 13 Sep 2023 05:02:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240018AbjIMMCh (ORCPT + 99 others); Wed, 13 Sep 2023 08:02:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239632AbjIMMCg (ORCPT ); Wed, 13 Sep 2023 08:02:36 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC9CE19AC; Wed, 13 Sep 2023 05:02:32 -0700 (PDT) Received: from [192.168.88.20] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D9911BEB; Wed, 13 Sep 2023 14:00:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1694606459; bh=cswXhRm1e1DcA5shIZXc+UdI9/fAUQAb3D1e4uW/sS4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=D0s47RcRZq5Dle5bWezeRXWqB2YlSXsj8GyHlBQcINOj2NEqKt+qy9MtXPPLdYfCU ai3SewP2FH7mo25fxHBCodpG24BOq+Qlx/i+JkWxHFr4eh5R7lym5JxOMuDTi+We1M XRu5RxyQGEQNR34PN/tV6PMMDW1ADtKFFGkC0PkQ= Message-ID: <0cd10461-aff1-9302-3d36-dd2ba609195a@ideasonboard.com> Date: Wed, 13 Sep 2023 15:02:28 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH] drm/omap: dsi: Fix deferred probe warnings Content-Language: en-US To: Tony Lindgren , Laurent Pinchart Cc: David Airlie , Daniel Vetter , Sebastian Reichel , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230412073954.20601-1-tony@atomide.com> <20230412085044.GP11253@pendragon.ideasonboard.com> <2bf56c04-733b-24a5-a344-166a94cd51f7@ideasonboard.com> <20230412085926.GR11253@pendragon.ideasonboard.com> <20230913073755.GE5285@atomide.com> From: Tomi Valkeinen In-Reply-To: <20230913073755.GE5285@atomide.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Sep 2023 05:02:39 -0700 (PDT) X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email On 13/09/2023 10:37, Tony Lindgren wrote: > * Laurent Pinchart [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