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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80532C433DF for ; Wed, 12 Aug 2020 05:48:27 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2E9FD20768 for ; Wed, 12 Aug 2020 05:48:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="Ii0co2PP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E9FD20768 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 271496E051; Wed, 12 Aug 2020 05:48:26 +0000 (UTC) Received: from m43-7.mailgun.net (m43-7.mailgun.net [69.72.43.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89FBB6E051 for ; Wed, 12 Aug 2020 05:48:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597211304; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=pcchFqlGO204owbj4tYlSsiQCb+7lLvPn9Lhykdi2Js=; b=Ii0co2PPZ5ay02q0+fJEmIHTjAXNm4lmowciPehqh3eXdTeBI2BGOMXqylLkbzTrJk3H+Qxw jRVSqYDyStV3ybtKAfe5+MnZcHNMWJ2sF9GAlDN+TyHUVTfrWQgL6w62FvH7uSbv98SgkkRG cKgtW+naeYV/pQf4kV+hwFPATxI= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyJkOTU5ZSIsICJkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-west-2.postgun.com with SMTP id 5f33829bd96d28d61e2768df (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 12 Aug 2020 05:48:11 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 1358AC433CA; Wed, 12 Aug 2020 05:48:11 +0000 (UTC) Received: from [192.168.1.15] (unknown [61.1.229.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak) by smtp.codeaurora.org (Postfix) with ESMTPSA id 339F8C433C6; Wed, 12 Aug 2020 05:48:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 339F8C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=rnayak@codeaurora.org Subject: Re: [RFC v2 03/11] tty: serial: qcom_geni_serial: Use OPP API to set clk/perf state To: John Stultz References: <20190320094918.20234-1-rnayak@codeaurora.org> <20190320094918.20234-4-rnayak@codeaurora.org> From: Rajendra Nayak Message-ID: Date: Wed, 12 Aug 2020 11:18:01 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US 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: Amit Pundir , Ulf Hansson , linux-scsi@vger.kernel.org, "Rafael J. Wysocki" , linux-arm-msm , Stephen Boyd , Linux PM list , lkml , dri-devel , Doug Anderson , Bjorn Andersson , linux-serial@vger.kernel.org, Viresh Kumar , linux-spi@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 8/12/2020 7:03 AM, John Stultz wrote: > On Tue, Aug 11, 2020 at 4:11 PM John Stultz wrote: >> >> On Wed, Mar 20, 2019 at 2:49 AM Rajendra Nayak 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 >>> Signed-off-by: Stephen Boyd >>> --- >>> 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? [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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel