From mboxrd@z Thu Jan 1 00:00:00 1970 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 A5481E70717 for ; Thu, 21 Sep 2023 11:35:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02BD910E5C8; Thu, 21 Sep 2023 11:35:50 +0000 (UTC) Received: from muru.com (muru.com [72.249.23.125]) by gabe.freedesktop.org (Postfix) with ESMTP id 66FAE10E5C8 for ; Thu, 21 Sep 2023 11:35:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 9C055809E; Thu, 21 Sep 2023 11:35:46 +0000 (UTC) Date: Thu, 21 Sep 2023 14:35:45 +0300 From: Tony Lindgren To: Tomi Valkeinen Subject: Re: [PATCH] drm/mipi-dsi: Fix detach call without attach Message-ID: <20230921113545.GR5285@atomide.com> References: <20230921-dsi-detach-fix-v1-1-d0de2d1621d9@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230921-dsi-detach-fix-v1-1-d0de2d1621d9@ideasonboard.com> 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: Thomas Zimmermann , "H. Nikolaus Schaller" , linux-kernel@vger.kernel.org, Maxime Ripard , Andrzej Hajda , dri-devel@lists.freedesktop.org, Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" * Tomi Valkeinen [230921 10:51]: > mipi_dsi_host_unregister() will call two functions for all its DSI > peripheral devices: mipi_dsi_detach() and mipi_dsi_device_unregister(). > The latter makes sense, as the device exists, but the former may be > wrong as attach has not necessarily been done. > > To fix this, track the attached state of the peripheral, and only detach > from mipi_dsi_host_unregister() if the peripheral was attached. > > Note that I have only tested this with a board with an i2c DSI > peripheral, not with a "pure" DSI peripheral. Thanks this fixes the deferred probe warning I've been seeing: Tested-by: Tony Lindgren From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98A59E7D0A4 for ; Thu, 21 Sep 2023 18:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230290AbjIUSQd (ORCPT ); Thu, 21 Sep 2023 14:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbjIUSQY (ORCPT ); Thu, 21 Sep 2023 14:16:24 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 28F8D720F1 for ; Thu, 21 Sep 2023 10:33:34 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 9C055809E; Thu, 21 Sep 2023 11:35:46 +0000 (UTC) Date: Thu, 21 Sep 2023 14:35:45 +0300 From: Tony Lindgren To: Tomi Valkeinen Cc: "H. Nikolaus Schaller" , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Laurent Pinchart Subject: Re: [PATCH] drm/mipi-dsi: Fix detach call without attach Message-ID: <20230921113545.GR5285@atomide.com> References: <20230921-dsi-detach-fix-v1-1-d0de2d1621d9@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230921-dsi-detach-fix-v1-1-d0de2d1621d9@ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Tomi Valkeinen [230921 10:51]: > mipi_dsi_host_unregister() will call two functions for all its DSI > peripheral devices: mipi_dsi_detach() and mipi_dsi_device_unregister(). > The latter makes sense, as the device exists, but the former may be > wrong as attach has not necessarily been done. > > To fix this, track the attached state of the peripheral, and only detach > from mipi_dsi_host_unregister() if the peripheral was attached. > > Note that I have only tested this with a board with an i2c DSI > peripheral, not with a "pure" DSI peripheral. Thanks this fixes the deferred probe warning I've been seeing: Tested-by: Tony Lindgren