From patchwork Wed Apr 12 07:39:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 13208593 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD177C7619A for ; Wed, 12 Apr 2023 07:45:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 18C8E10E299; Wed, 12 Apr 2023 07:45:53 +0000 (UTC) X-Greylist: delayed 340 seconds by postgrey-1.36 at gabe; Wed, 12 Apr 2023 07:45:52 UTC Received: from muru.com (muru.com [72.249.23.125]) by gabe.freedesktop.org (Postfix) with ESMTP id 49A5510E299 for ; Wed, 12 Apr 2023 07:45:52 +0000 (UTC) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id CE58B80CD; Wed, 12 Apr 2023 07:40:09 +0000 (UTC) From: Tony Lindgren To: Tomi Valkeinen , David Airlie , Daniel Vetter Subject: [PATCH] drm/omap: dsi: Fix deferred probe warnings Date: Wed, 12 Apr 2023 10:39:53 +0300 Message-Id: <20230412073954.20601-1-tony@atomide.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Laurent Pinchart , dri-devel@lists.freedesktop.org, Sebastian Reichel Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. Let's fix the warnings by checking for a valid dsi->dsidev. Signed-off-by: Tony Lindgren --- 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);