From: Rajendra Nayak <rnayak@codeaurora.org>
To: Amit Pundir <amit.pundir@linaro.org>
Cc: John Stultz <john.stultz@linaro.org>,
lkml <linux-kernel@vger.kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-scsi@vger.kernel.org,
Linux PM list <linux-pm@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Doug Anderson <dianders@chromium.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
linux-spi@vger.kernel.org, linux-serial@vger.kernel.org,
Viresh Kumar <viresh.kumar@linaro.org>,
Stephen Boyd <swboyd@chromium.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [RFC v2 03/11] tty: serial: qcom_geni_serial: Use OPP API to set clk/perf state
Date: Wed, 12 Aug 2020 14:56:17 +0530 [thread overview]
Message-ID: <fb5b6abf-b26a-5db2-1f8f-23d457c7235e@codeaurora.org> (raw)
In-Reply-To: <aab760b8-2a06-ae96-584a-301d5326fc0d@codeaurora.org>
On 8/12/2020 1:09 PM, Rajendra Nayak wrote:
>
> On 8/12/2020 1:05 PM, Amit Pundir wrote:
>> Hi Rajendra,
>>
>> On Wed, 12 Aug 2020 at 11:18, Rajendra Nayak <rnayak@codeaurora.org> wrote:
>>>
>>>
>>> On 8/12/2020 7:03 AM, John Stultz wrote:
>>>> On Tue, Aug 11, 2020 at 4:11 PM John Stultz <john.stultz@linaro.org> wrote:
>>>>>
>>>>> On Wed, Mar 20, 2019 at 2:49 AM Rajendra Nayak <rnayak@codeaurora.org> wrote:
>>>>>>
>>>>>> geni serial needs to express a perforamnce state requirement on CX
>>>>>> depending on the frequency of the clock rates. Use OPP table from
>>>>>> DT to register with OPP framework and use dev_pm_opp_set_rate() to
>>>>>> set the clk/perf state.
>>>>>>
>>>>>> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
>>>>>> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
>>>>>> ---
>>>>>> drivers/tty/serial/qcom_geni_serial.c | 15 +++++++++++++--
>>>>>> 1 file changed, 13 insertions(+), 2 deletions(-)
>>>>>>
>>>>>
>>>>> Hey,
>>>>> I just wanted to follow up on this patch, as I've bisected it
>>>>> (a5819b548af0) down as having broken qca bluetooth on the Dragonboard
>>>>> 845c.
>>>>>
>>>>> I haven't yet had time to debug it yet, but wanted to raise the issue
>>>>> in case anyone else has seen similar trouble.
>>>>
>>>> So I dug in a bit further, and this chunk seems to be causing the issue:
>>>>> @@ -961,7 +963,7 @@ static void qcom_geni_serial_set_termios(struct uart_port *uport,
>>>>> goto out_restart_rx;
>>>>>
>>>>> uport->uartclk = clk_rate;
>>>>> - clk_set_rate(port->se.clk, clk_rate);
>>>>> + dev_pm_opp_set_rate(port->dev, clk_rate);
>>>>> ser_clk_cfg = SER_CLK_EN;
>>>>> ser_clk_cfg |= clk_div << CLK_DIV_SHFT;
>>>>>
>>>>
>>>>
>>>> With that applied, I see the following errors in dmesg and bluetooth
>>>> fails to function:
>>>> [ 4.763467] qcom_geni_serial 898000.serial: dev_pm_opp_set_rate:
>>>> failed to find OPP for freq 102400000 (-34)
>>>> [ 4.773493] qcom_geni_serial 898000.serial: dev_pm_opp_set_rate:
>>>> failed to find OPP for freq 102400000 (-34)
>>>>
>>>> With just that chunk reverted on linus/HEAD, bluetooth seems to work ok.
>>>
>>> This seems like the same issue that was also reported on venus [1] because the
>>> clock frequency tables apparently don;t exactly match the achievable clock
>>> frequencies (which we also used to construct the OPP tables)
>>>
>>> Can you try updating the OPP table for QUP to have 102400000 instead of the
>>> current 100000000 and see if that fixes it?
>>
>> That worked. Thanks.
>>
>> Should this change be common to base sdm845.dtsi or platform specific dts?
>> For what it's worth, we see this BT breakage on PocoF1 phone too.
>
> Thanks for confirming, it will have to be part of the SoC dtsi, and I am
> guessing a similar change is perhaps also needed on sc7180.
> I will send a patch out to fix the OPP tables for both.
I spent some more time looking at this and it does not look like this is the
rounding issues with clock FMAX tables. I had these tables picked from downstream
clock code and it turns out these tables were reworked at clock init based on
the silicon rev, so I need to fix up the OPP tables accordingly which will add
a new OPP entry for 102.4Mhz. I'll post a patch shortly.
>
>>
>> Regards,
>> Amit Pundir
>>
>>
>>>
>>> [1] https://lkml.org/lkml/2020/7/27/507
>>>
>>>>
>>>> thanks
>>>> -john
>>>>
>>>
>>> --
>>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
>>> of Code Aurora Forum, hosted by The Linux Foundation
>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2020-08-12 9:26 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 9:49 [RFC v2 00/11] DVFS in the OPP core Rajendra Nayak
2019-03-20 9:49 ` [RFC v2 01/11] OPP: Don't overwrite rounded clk rate Rajendra Nayak
2019-06-11 10:54 ` Viresh Kumar
2019-06-12 7:42 ` Rajendra Nayak
2019-06-12 8:25 ` Viresh Kumar
2019-06-13 9:54 ` Viresh Kumar
2019-06-14 5:27 ` Viresh Kumar
2019-06-17 3:50 ` Viresh Kumar
2019-06-17 4:07 ` Rajendra Nayak
2019-06-17 4:17 ` Viresh Kumar
2019-06-17 4:25 ` Rajendra Nayak
2019-06-14 5:54 ` Rajendra Nayak
2019-03-20 9:49 ` [RFC v2 02/11] OPP: Make dev_pm_opp_set_rate() with freq=0 as valid Rajendra Nayak
2019-06-14 6:32 ` Viresh Kumar
2019-06-17 4:04 ` Rajendra Nayak
2019-03-20 9:49 ` [RFC v2 03/11] tty: serial: qcom_geni_serial: Use OPP API to set clk/perf state Rajendra Nayak
2020-08-11 23:11 ` John Stultz
2020-08-12 1:33 ` John Stultz
2020-08-12 5:48 ` Rajendra Nayak
2020-08-12 7:35 ` Amit Pundir
2020-08-12 7:39 ` Rajendra Nayak
2020-08-12 9:26 ` Rajendra Nayak [this message]
2019-03-20 9:49 ` [RFC v2 04/11] spi: spi-geni-qcom: " Rajendra Nayak
2019-03-20 9:49 ` [RFC v2 05/11] arm64: dts: sdm845: Add OPP table for all qup devices Rajendra Nayak
2019-03-20 9:49 ` [RFC v2 06/11] scsi: ufs: Add support to manage multiple power domains in ufshcd-pltfrm Rajendra Nayak
2019-03-20 9:49 ` [RFC v2 07/11] scsi: ufs: Add support for specifying OPP tables in DT Rajendra Nayak
2019-03-20 9:49 ` [RFC v2 08/11] arm64: dts: sdm845: Add ufs opps and power-domains Rajendra Nayak
2019-05-14 7:53 ` Ulf Hansson
2019-03-20 9:49 ` [RFC v2 09/11] drm/msm/dpu: Use OPP API to set clk/perf state Rajendra Nayak
2019-04-10 3:49 ` Viresh Kumar
2019-04-10 3:49 ` Viresh Kumar
2019-03-20 9:49 ` [RFC v2 10/11] drm/msm: dsi: " Rajendra Nayak
2019-03-20 9:49 ` [RFC v2 11/11] arm64: dts: sdm845: Add DSI and MDP OPP tables and power-domains Rajendra Nayak
2019-04-10 3:51 ` [RFC v2 00/11] DVFS in the OPP core Viresh Kumar
2019-04-10 3:51 ` Viresh Kumar
2019-05-21 6:22 ` Viresh Kumar
2019-05-24 6:03 ` Rajendra Nayak
2019-06-17 4:26 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb5b6abf-b26a-5db2-1f8f-23d457c7235e@codeaurora.org \
--to=rnayak@codeaurora.org \
--cc=amit.pundir@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=john.stultz@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=swboyd@chromium.org \
--cc=ulf.hansson@linaro.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).