Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp872887imd; Thu, 1 Nov 2018 06:57:16 -0700 (PDT) X-Google-Smtp-Source: AJdET5f3Jmjihk/9zOHed/4Pdt2Fb7ofvma7WHx4rBCehqw5mETYhOxDpKh9+Cul7wR0JtoSUkG4 X-Received: by 2002:a65:5286:: with SMTP id y6mr5139183pgp.439.1541080636414; Thu, 01 Nov 2018 06:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541080636; cv=none; d=google.com; s=arc-20160816; b=GNLfpQeEGfMHaVdqo61J8Skt5jSDPA+SRWNDDfPzNbN8wQtMSg865gHyYVquFn1uPu qelc1LkW+hZiW4Axtw/Gj5ShPemCEKqb7f3MJi+hbPagG8EbGZOOVKa5WW3/wgODV0dh qmcFwQjwlzGZwQEFipp2EzexXajHEToeroG42duHrIfHw+1GVYY9DnaoQ112wsG83YM8 K8uMgswl4bAd2TBpKhyFbvbJw9XR+C3SFE5ENuKJJwv34ykk8H8X5WCYn5Hf5xQetUu6 QGXUZ7b4SABII55u1ynhrVyAgaE3ZGV9CTDybjAQlrprbMnMrnuoVMlrgyO/W8QG3gyh lMfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=+jtBHWjsOfJeGigaOTutCncOXz9WX65sCAtVadnxm58=; b=DfgcJ9I9HAjxyEKgAzGzui1dcWAcRHuUHsoeKSTwbN9DY5wK/tapeyG2uhlEZJ7nIc 8yQZo0zYrw13mo42XZ0d2FQgW+p4+EvLsi1cHThuWndk3l3dsYqzxBIvCBEREa8R7s3p j7a6+NNuUjduhSQqpX1vybF5FjBqoYf9xdTECEgBIIv7bj+EkCVU8O5x6Y86J3cwifoH GqMQnrGNrggKNXdA8hzwEQcvbzATaIRNY8EXo9kahNAS1MjrkjYUS5zdIjySLYtGZJtM 23r8o4Y7SS428DvSpihlWyFUTw8SVn4gMMp2Ok2pl53HWWaCUm/Rt0iHjB53ONI3fQjA 407Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z127-v6si31031843pgb.118.2018.11.01.06.57.00; Thu, 01 Nov 2018 06:57:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728717AbeKAW7M (ORCPT + 99 others); Thu, 1 Nov 2018 18:59:12 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34208 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728748AbeKAW7M (ORCPT ); Thu, 1 Nov 2018 18:59:12 -0400 Received: by mail-ed1-f68.google.com with SMTP id w19-v6so16620861eds.1 for ; Thu, 01 Nov 2018 06:56:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+jtBHWjsOfJeGigaOTutCncOXz9WX65sCAtVadnxm58=; b=gcSr8CICu9LkHd3u2KH4vaWWHmQzlrdQ2sjxGHwY1wwx9nXWuSVr8ZmYowOMlcEMza Rzef9ezwFiyCDShDqCSghr/48KTgRMYvtN0T0XA6WgvnKfx6r/NTkjgfAohavnFu0J/I BNEHP1UcDGiG8eNlQoQJRqZT3vrYqFCF2J6kICp2HdU9Cd293d2W4Z7+/MiZ5AUf+kXV ahsCVX0OtvgqAdVy05w3RwYwfEzOqBlItXKZhGeQYgx7aGxjgZOBuBeWP19x6IvLuNR8 8/p1uShbgoSBjn2BmbF8iRuY9ONUiuzLlCvk8xkphY3XIXTXwP9i1PLyw0cGTg8I0Lin 2RRw== X-Gm-Message-State: AGRZ1gIu0QbXRCUzCcZ+iUr8afkMxGMhW3y4O51xRo6n7lt1OcKt4Ydl 1+UjTECBJl6eQCkmqhwwinMEBQ== X-Received: by 2002:a17:906:2d4a:: with SMTP id e10-v6mr4033911eji.105.1541080566033; Thu, 01 Nov 2018 06:56:06 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id d23-v6sm730003ejk.21.2018.11.01.06.56.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Nov 2018 06:56:05 -0700 (PDT) Subject: Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL) To: Pierre-Louis Bossart , Dean Wallace Cc: Andy Shevchenko , Stephen Boyd , Michael Turquette , linux-clk , Stable , Johannes Stezenbach , Andy Shevchenko , Linux Kernel Mailing List , Mogens Jensen References: <20181029190819.2ivlx73n6y6sx4vk@picard> <20181030143836.feo7zcxiestylxoo@picard> <2d429c87-24c5-4075-683e-b0d12c3eb1c2@linux.intel.com> <20181030161534.wk5cf7nxbwhp2far@picard> <307c2074-d268-a87a-6040-1240a2091a4d@redhat.com> <20181031200709.xrmu6wsdel7dtcjq@picard> From: Hans de Goede Message-ID: Date: Thu, 1 Nov 2018 14:56:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 31-10-18 23:27, Pierre-Louis Bossart wrote: > >> Just thought it worth mentioning, this new patch that fixes sound >> again, seems to have ressurected an old issue with PLL unlock.  I'm >> seeing journal entries after fresh boot ...... >> >> ``` >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard systemd[462]: Started Sound Service. >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> picard kernel: max98090_pll_work: 141 callbacks suppressed >> picard kernel: max98090 i2c-193C9890:00: PLL unlocked >> ``` >> >> sound is ok, but sometimes plugging in headphones spams journal with >> those PLL messages, and sound turns into "daleks", and I have to >> remove/insert headphones few times or stop/start audio to fix it. >> It's a very old issue, maybe you'd know more about it. > > I noticed this error on my Orco device used for tests many moons ago, but I could never find out what led to this error case, it wasn't deterministic and didn't impact the audio quality. All I could do is rate_limit it... If we have an A vs. B situation it'd be really helpful to diagnose further. > > Is there really a causality between the changes from Hans and this PLL unlock error? That is actually not unlikely. We have the mclk as the source clk for the PLL and if we enable/disable it and/or change the src-clk then the PLL will loose its lock and it needs some time to re-lock. So these errors indicate that we need to either: 1) Sleep a bit after enabling the mclk; (and/or after changing the PLL src clk I've not checked if this driver does this) 2) Or poll the PLL locked bit after enabling the mclk until it indicate it has locked (and/or after changing the PLL src clk) I've had to do similar things in u-boot when turning on PLL-s for DRAM and stuff, so this sounds familiar. Dean since you have the hardware, this is probably easiest for you to fix (since you can reproduce the issue) do you feel up to giving fixing this a shot? I think it is fine if you just go with the simple solution of adding a msleep(xx) at the right place. I would expect 10 (ms) to do the trick. If that works you may also try to give 5ms a shot. Regards, Hans