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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3F7E5C4167B for ; Fri, 8 Dec 2023 16:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TPR3RPM8EKV6sxC8L8JPbQgwHZsBYRWATx6c+CR0uUg=; b=yJpAlo8HHzUEF9 5geann7Tjw/BRaMU9zTF455WK1Put27+HeWaADjxXBdGD+FKflHw5LHf2qslYCGOzyqip5DeM1sGf UFeKSCqCpP61YSK0susE3LBq3oYCFoA/SR8Sm2A9dI/NX14lLk0b4JGQLQ4ibAjm2mu3qUCy2fJVX OdwzNFpnuJKjhD3LYv21YWig6RhKDssyaMdxYvdosCRiH43Q6COPYl9Qabm4jOovyvtmFLVh4AmML ZpOKLLJA9RNCLihEULNdnaU2A3QUvDfOylZuWh63f1RQb08RLreSsiJGrE2WgYGaxTmYEVHEPUskb 3a9FRmnEnLrj8CSTH6vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBeBz-00G6Yv-0k; Fri, 08 Dec 2023 16:59:11 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBeBw-00G6X3-1U for linux-arm-kernel@lists.infradead.org; Fri, 08 Dec 2023 16:59:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 83653B82E8B; Fri, 8 Dec 2023 16:59:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC84DC433C8; Fri, 8 Dec 2023 16:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702054742; bh=h0JkAKzYF1eCC3VCUFet/wUloQePgRqJtpyUOwrwHs8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VV9pLQrduCHZxqG1gp2gsdESd89zqUJ8T/ztaw9WJVw7s21G8m8muHVlDot3+Gf40 65myTt3MriTs13uBBjQtrCxREZctMcuNBTs7qnGtm24UGeLP0ZZIHk1cDe2BqhGoG5 6n9im+9fMvwh7N5TggcZFvP6o6io3PyaZcgCS1iYmLOW+edW4FBFuzCKI3FXRVqssq gBwKneVYebD7Q/ruS5A6bejC3WL/NZroDaT74VKIptNNKVPIXywOlsdC0uq209XkCP And+nEwHTfPBhvawAtMy7NfdJGgiRcPQgMJR+qF0p4bLHgxxd7/yjMuh2w1hz5BSiS rFmD07v7UUqtw== Date: Fri, 8 Dec 2023 16:58:55 +0000 From: Simon Horman To: Raphael Gallais-Pou Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Yannick Fertre , Philippe Cornu , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Richard Cochran , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, netdev@vger.kernel.org Subject: Re: [PATCH v2 3/4] drm/stm: dsi: expose DSI PHY internal clock Message-ID: <20231208165855.GA8459@kernel.org> References: <20231204101113.276368-1-raphael.gallais-pou@foss.st.com> <20231204101113.276368-4-raphael.gallais-pou@foss.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231204101113.276368-4-raphael.gallais-pou@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231208_085908_667267_49D90FCE X-CRM114-Status: GOOD ( 14.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 04, 2023 at 11:11:12AM +0100, Raphael Gallais-Pou wrote: ... > @@ -514,18 +675,40 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev) > dsi->lane_max_kbps *= 2; > } > > - dw_mipi_dsi_stm_plat_data.base = dsi->base; > - dw_mipi_dsi_stm_plat_data.priv_data = dsi; > + dsi->pdata = *pdata; > + dsi->pdata.base = dsi->base; > + dsi->pdata.priv_data = dsi; > + > + dsi->pdata.max_data_lanes = 2; > + dsi->pdata.phy_ops = &dw_mipi_dsi_stm_phy_ops; > > platform_set_drvdata(pdev, dsi); > > - dsi->dsi = dw_mipi_dsi_probe(pdev, &dw_mipi_dsi_stm_plat_data); > + dsi->dsi = dw_mipi_dsi_probe(pdev, &dsi->pdata); > if (IS_ERR(dsi->dsi)) { > ret = PTR_ERR(dsi->dsi); > dev_err_probe(dev, ret, "Failed to initialize mipi dsi host\n"); > goto err_dsi_probe; > } > > + /* > + * We need to wait for the generic bridge to probe before enabling and > + * register the internal pixel clock. > + */ > + ret = clk_prepare_enable(dsi->pclk); > + if (ret) { > + DRM_ERROR("%s: Failed to enable peripheral clk\n", __func__); > + goto err_dsi_probe; > + } > + > + ret = dw_mipi_dsi_clk_register(dsi, dev); > + if (ret) { > + DRM_ERROR("Failed to register DSI pixel clock: %d\n", ret); Hi Raphael, Does clk_disable_unprepare(dsi->pclk) need to be added to this unwind chain? Flagged by Smatch. > + goto err_dsi_probe; > + } > + > + clk_disable_unprepare(dsi->pclk); > + > return 0; > > err_dsi_probe: ... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64BFC32C7A; Fri, 8 Dec 2023 16:59:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VV9pLQrd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC84DC433C8; Fri, 8 Dec 2023 16:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702054742; bh=h0JkAKzYF1eCC3VCUFet/wUloQePgRqJtpyUOwrwHs8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VV9pLQrduCHZxqG1gp2gsdESd89zqUJ8T/ztaw9WJVw7s21G8m8muHVlDot3+Gf40 65myTt3MriTs13uBBjQtrCxREZctMcuNBTs7qnGtm24UGeLP0ZZIHk1cDe2BqhGoG5 6n9im+9fMvwh7N5TggcZFvP6o6io3PyaZcgCS1iYmLOW+edW4FBFuzCKI3FXRVqssq gBwKneVYebD7Q/ruS5A6bejC3WL/NZroDaT74VKIptNNKVPIXywOlsdC0uq209XkCP And+nEwHTfPBhvawAtMy7NfdJGgiRcPQgMJR+qF0p4bLHgxxd7/yjMuh2w1hz5BSiS rFmD07v7UUqtw== Date: Fri, 8 Dec 2023 16:58:55 +0000 From: Simon Horman To: Raphael Gallais-Pou Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Yannick Fertre , Philippe Cornu , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Richard Cochran , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, netdev@vger.kernel.org Subject: Re: [PATCH v2 3/4] drm/stm: dsi: expose DSI PHY internal clock Message-ID: <20231208165855.GA8459@kernel.org> References: <20231204101113.276368-1-raphael.gallais-pou@foss.st.com> <20231204101113.276368-4-raphael.gallais-pou@foss.st.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231204101113.276368-4-raphael.gallais-pou@foss.st.com> On Mon, Dec 04, 2023 at 11:11:12AM +0100, Raphael Gallais-Pou wrote: ... > @@ -514,18 +675,40 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev) > dsi->lane_max_kbps *= 2; > } > > - dw_mipi_dsi_stm_plat_data.base = dsi->base; > - dw_mipi_dsi_stm_plat_data.priv_data = dsi; > + dsi->pdata = *pdata; > + dsi->pdata.base = dsi->base; > + dsi->pdata.priv_data = dsi; > + > + dsi->pdata.max_data_lanes = 2; > + dsi->pdata.phy_ops = &dw_mipi_dsi_stm_phy_ops; > > platform_set_drvdata(pdev, dsi); > > - dsi->dsi = dw_mipi_dsi_probe(pdev, &dw_mipi_dsi_stm_plat_data); > + dsi->dsi = dw_mipi_dsi_probe(pdev, &dsi->pdata); > if (IS_ERR(dsi->dsi)) { > ret = PTR_ERR(dsi->dsi); > dev_err_probe(dev, ret, "Failed to initialize mipi dsi host\n"); > goto err_dsi_probe; > } > > + /* > + * We need to wait for the generic bridge to probe before enabling and > + * register the internal pixel clock. > + */ > + ret = clk_prepare_enable(dsi->pclk); > + if (ret) { > + DRM_ERROR("%s: Failed to enable peripheral clk\n", __func__); > + goto err_dsi_probe; > + } > + > + ret = dw_mipi_dsi_clk_register(dsi, dev); > + if (ret) { > + DRM_ERROR("Failed to register DSI pixel clock: %d\n", ret); Hi Raphael, Does clk_disable_unprepare(dsi->pclk) need to be added to this unwind chain? Flagged by Smatch. > + goto err_dsi_probe; > + } > + > + clk_disable_unprepare(dsi->pclk); > + > return 0; > > err_dsi_probe: ... 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 674F5C10F05 for ; Fri, 8 Dec 2023 16:59:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C2EA10E095; Fri, 8 Dec 2023 16:59:07 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3724610E095 for ; Fri, 8 Dec 2023 16:59:05 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 83653B82E8B; Fri, 8 Dec 2023 16:59:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC84DC433C8; Fri, 8 Dec 2023 16:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702054742; bh=h0JkAKzYF1eCC3VCUFet/wUloQePgRqJtpyUOwrwHs8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VV9pLQrduCHZxqG1gp2gsdESd89zqUJ8T/ztaw9WJVw7s21G8m8muHVlDot3+Gf40 65myTt3MriTs13uBBjQtrCxREZctMcuNBTs7qnGtm24UGeLP0ZZIHk1cDe2BqhGoG5 6n9im+9fMvwh7N5TggcZFvP6o6io3PyaZcgCS1iYmLOW+edW4FBFuzCKI3FXRVqssq gBwKneVYebD7Q/ruS5A6bejC3WL/NZroDaT74VKIptNNKVPIXywOlsdC0uq209XkCP And+nEwHTfPBhvawAtMy7NfdJGgiRcPQgMJR+qF0p4bLHgxxd7/yjMuh2w1hz5BSiS rFmD07v7UUqtw== Date: Fri, 8 Dec 2023 16:58:55 +0000 From: Simon Horman To: Raphael Gallais-Pou Subject: Re: [PATCH v2 3/4] drm/stm: dsi: expose DSI PHY internal clock Message-ID: <20231208165855.GA8459@kernel.org> References: <20231204101113.276368-1-raphael.gallais-pou@foss.st.com> <20231204101113.276368-4-raphael.gallais-pou@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231204101113.276368-4-raphael.gallais-pou@foss.st.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: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Conor Dooley , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Thomas Zimmermann , Yannick Fertre , Alexandre Torgue , Maxime Ripard , linux-stm32@st-md-mailman.stormreply.com, Rob Herring , Philippe Cornu , Maxime Coquelin , netdev@vger.kernel.org, Richard Cochran , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Dec 04, 2023 at 11:11:12AM +0100, Raphael Gallais-Pou wrote: ... > @@ -514,18 +675,40 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev) > dsi->lane_max_kbps *= 2; > } > > - dw_mipi_dsi_stm_plat_data.base = dsi->base; > - dw_mipi_dsi_stm_plat_data.priv_data = dsi; > + dsi->pdata = *pdata; > + dsi->pdata.base = dsi->base; > + dsi->pdata.priv_data = dsi; > + > + dsi->pdata.max_data_lanes = 2; > + dsi->pdata.phy_ops = &dw_mipi_dsi_stm_phy_ops; > > platform_set_drvdata(pdev, dsi); > > - dsi->dsi = dw_mipi_dsi_probe(pdev, &dw_mipi_dsi_stm_plat_data); > + dsi->dsi = dw_mipi_dsi_probe(pdev, &dsi->pdata); > if (IS_ERR(dsi->dsi)) { > ret = PTR_ERR(dsi->dsi); > dev_err_probe(dev, ret, "Failed to initialize mipi dsi host\n"); > goto err_dsi_probe; > } > > + /* > + * We need to wait for the generic bridge to probe before enabling and > + * register the internal pixel clock. > + */ > + ret = clk_prepare_enable(dsi->pclk); > + if (ret) { > + DRM_ERROR("%s: Failed to enable peripheral clk\n", __func__); > + goto err_dsi_probe; > + } > + > + ret = dw_mipi_dsi_clk_register(dsi, dev); > + if (ret) { > + DRM_ERROR("Failed to register DSI pixel clock: %d\n", ret); Hi Raphael, Does clk_disable_unprepare(dsi->pclk) need to be added to this unwind chain? Flagged by Smatch. > + goto err_dsi_probe; > + } > + > + clk_disable_unprepare(dsi->pclk); > + > return 0; > > err_dsi_probe: ...