Message ID | 20230302122908.221398-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4207793wrd; Thu, 2 Mar 2023 04:31:33 -0800 (PST) X-Google-Smtp-Source: AK7set/bp3uox7yvgLxkFBPKwz1pDhObaJ574POr9iXv9xklnfKyzDrSLkfgidAO/j0ECw9LfPG8 X-Received: by 2002:a17:907:628a:b0:8b1:7dea:cc40 with SMTP id nd10-20020a170907628a00b008b17deacc40mr12560443ejc.9.1677760292878; Thu, 02 Mar 2023 04:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677760292; cv=none; d=google.com; s=arc-20160816; b=a44w8R4jh3JVJRh1L0E+9Gzho/xHGlDUSCWbnK3A5Sl3jRi4S344G7pOG9sCMT/8Ud AFna9k2m6KdK7vNIuG1AwPwfXo7jJjmGjjyqwo6YF4lyHPMNpyF2GQupHT2cT18GHV7b 8xgngSNjqgi11JFJB46cds17gMiZQBAtAANE78EQ4aGKgfW2Tyc8T6rWzIeoTQ81SBbc +QVvF/PV0RJ2ntwtpAxTnTeS3w2Qnr8ZCbkeGSx9It5pGMr7UYUjhI9FtmkLpHT7aw+O Gr2LkpMa3v/sUT39QlU3sBwLe8qNmEgB43GVZs6+XokZpLt4DBzZMFabRxIi5hsHYVyd ZipA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MkMpyzZmxlO9b2AsSdB9NaVD+MPuHTACY2Gn31+0dVU=; b=jrp7GkiYZIlPuW81gh452mpdT5yYFjKDfwR1P8iUTPmj20heAiXMzM8PJuixwK/ub8 boNY+6ZDhun9cl4hSAnvRBXLIFceztlAvJRINDE+gcKcl3N7+BsD6xV0nR6IGbnjF6mX FsvLRg4h8/ytHg7NUK5v0vDJcFXS9WOOkwiZXwScA46WGx20zljOR2EEpWOWgQ+8SDqg gkw9Hs3bCBE3FLjfmV13CsyCCLatVslwFCjzDIfPyBlVL8r0GGpaSSVXAYHSSAbCfhJD J9RBd5bPq0KYzVi3eo4zLiOcm+reWA2N3IXHN9eUCoh7xR3+V4tBvnAQwhkbOM7qs5sz SiUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UaZu2BYW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a170906960800b008d46bf1a665si7283342ejx.891.2023.03.02.04.31.10; Thu, 02 Mar 2023 04:31:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UaZu2BYW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229711AbjCBM3Q (ORCPT <rfc822;davidbtadokoro@gmail.com> + 99 others); Thu, 2 Mar 2023 07:29:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjCBM3P (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Mar 2023 07:29:15 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E87B3196 for <linux-kernel@vger.kernel.org>; Thu, 2 Mar 2023 04:29:13 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id u9so17413000edd.2 for <linux-kernel@vger.kernel.org>; Thu, 02 Mar 2023 04:29:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677760152; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MkMpyzZmxlO9b2AsSdB9NaVD+MPuHTACY2Gn31+0dVU=; b=UaZu2BYWB0K2sii6++RoHtMF5I+lioLvgxeEoscuP9Va3mg+vWk6yAcjGTSJGqaa3k RGZ/LPMXH+9wXWkzahKFbc30DkZdm9Pbgyi+y7bHuu8bDoGPUeFAz54DCb3SOBMOZKNc dGSDKozlupvguO0NRPCDD5XF5gPF+vbAn1YD8IGp+pCblCZjAkjPNmectE11GvBenTwD THK74CQdYlgv+dhoxYvOkXw4X4foBcg4s9Px0u3M3UYD2eUM0rszKk41E7pnnv7acm3t NOBOlZ8oDh63mQPWSNFPl53EIfzWEosnIU7qzq3Gag1PvGR7BGsVCt6OBNNQqXin3+JC 6UVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677760152; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MkMpyzZmxlO9b2AsSdB9NaVD+MPuHTACY2Gn31+0dVU=; b=vpd1fR/GSgEQ23UyS2MlugVsbe16wpeYps9B+fTOKMg5ObWWW3eLEqyrxafoxlewQs pWCWNNUxQUZWeLMEmUEf20HooIsEBaT7IYoF24lth0VPy+rI2AWDzee8RX3DJU7ImLvB kve/MBLYMBdAO8Bq+W2aTsYl72m9kGfpacKv7VGMGjLOJxf4VLCkCfYX3Ep+hcoU3MvQ xYKW1PeTFWz9PHmfhXyKFl6aesuQWzb8gHLJilysA5xYlbRIeTnfeR8fuhhteExOEmmq O53F8Hjlrl2FKSUzmU5j33gQBf+luqFRSOz5sodyuUxyv4n9eyzruXf36jorA3gjyJ0W 4H4g== X-Gm-Message-State: AO0yUKVPnEjpXIuRckD5waxtMiPotxRpguGM4hnWSUBV+a5O2m71j1o7 vzy6JrROvn8RcEr80vwmbY9qew== X-Received: by 2002:a17:906:4887:b0:8af:54d2:36af with SMTP id v7-20020a170906488700b008af54d236afmr9381027ejq.76.1677760152468; Thu, 02 Mar 2023 04:29:12 -0800 (PST) Received: from krzk-bin.. ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id v13-20020a1709064e8d00b008e3bf17fb2asm7162155eju.19.2023.03.02.04.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 04:29:12 -0800 (PST) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Banajit Goswami <bgoswami@quicinc.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, stable@vger.kernel.org Subject: [PATCH] ASoC: qcom: q6prm: fix incorrect clk_root passed to ADSP Date: Thu, 2 Mar 2023 13:29:08 +0100 Message-Id: <20230302122908.221398-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759259176507998470?= X-GMAIL-MSGID: =?utf-8?q?1759259176507998470?= |
Series |
ASoC: qcom: q6prm: fix incorrect clk_root passed to ADSP
|
|
Commit Message
Krzysztof Kozlowski
March 2, 2023, 12:29 p.m. UTC
The second to last argument is clk_root (root of the clock), however the
code called q6prm_request_lpass_clock() with clk_attr instead
(copy-paste error). This effectively was passing value of 1 as root
clock which worked on some of the SoCs (e.g. SM8450) but fails on
others, depending on the ADSP. For example on SM8550 this "1" as root
clock is not accepted and results in errors coming from ADSP.
Fixes: 2f20640491ed ("ASoC: qdsp6: qdsp6: q6prm: handle clk disable correctly")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
sound/soc/qcom/qdsp6/q6prm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 02/03/2023 12:29, Krzysztof Kozlowski wrote: > The second to last argument is clk_root (root of the clock), however the > code called q6prm_request_lpass_clock() with clk_attr instead > (copy-paste error). This effectively was passing value of 1 as root > clock which worked on some of the SoCs (e.g. SM8450) but fails on > others, depending on the ADSP. For example on SM8550 this "1" as root > clock is not accepted and results in errors coming from ADSP. > > Fixes: 2f20640491ed ("ASoC: qdsp6: qdsp6: q6prm: handle clk disable correctly") > Cc: <stable@vger.kernel.org> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Nice Find, Tested on sc8280xp Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --srini > --- > sound/soc/qcom/qdsp6/q6prm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/qcom/qdsp6/q6prm.c b/sound/soc/qcom/qdsp6/q6prm.c > index 8aa1a213bfb7..c1dc5bae715a 100644 > --- a/sound/soc/qcom/qdsp6/q6prm.c > +++ b/sound/soc/qcom/qdsp6/q6prm.c > @@ -183,9 +183,9 @@ int q6prm_set_lpass_clock(struct device *dev, int clk_id, int clk_attr, int clk_ > unsigned int freq) > { > if (freq) > - return q6prm_request_lpass_clock(dev, clk_id, clk_attr, clk_attr, freq); > + return q6prm_request_lpass_clock(dev, clk_id, clk_attr, clk_root, freq); > > - return q6prm_release_lpass_clock(dev, clk_id, clk_attr, clk_attr, freq); > + return q6prm_release_lpass_clock(dev, clk_id, clk_attr, clk_root, freq); > } > EXPORT_SYMBOL_GPL(q6prm_set_lpass_clock); >
On Thu, 02 Mar 2023 13:29:08 +0100, Krzysztof Kozlowski wrote: > The second to last argument is clk_root (root of the clock), however the > code called q6prm_request_lpass_clock() with clk_attr instead > (copy-paste error). This effectively was passing value of 1 as root > clock which worked on some of the SoCs (e.g. SM8450) but fails on > others, depending on the ADSP. For example on SM8550 this "1" as root > clock is not accepted and results in errors coming from ADSP. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: qcom: q6prm: fix incorrect clk_root passed to ADSP commit: 65882134bc622a1e57bd5928ac588855ea2e3ddd All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/sound/soc/qcom/qdsp6/q6prm.c b/sound/soc/qcom/qdsp6/q6prm.c index 8aa1a213bfb7..c1dc5bae715a 100644 --- a/sound/soc/qcom/qdsp6/q6prm.c +++ b/sound/soc/qcom/qdsp6/q6prm.c @@ -183,9 +183,9 @@ int q6prm_set_lpass_clock(struct device *dev, int clk_id, int clk_attr, int clk_ unsigned int freq) { if (freq) - return q6prm_request_lpass_clock(dev, clk_id, clk_attr, clk_attr, freq); + return q6prm_request_lpass_clock(dev, clk_id, clk_attr, clk_root, freq); - return q6prm_release_lpass_clock(dev, clk_id, clk_attr, clk_attr, freq); + return q6prm_release_lpass_clock(dev, clk_id, clk_attr, clk_root, freq); } EXPORT_SYMBOL_GPL(q6prm_set_lpass_clock);