Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4905946imd; Tue, 30 Oct 2018 09:05:43 -0700 (PDT) X-Google-Smtp-Source: AJdET5eFMO0lR4PLA9nVuP7LUB69AWAK1kswW0bZmd8DHJeLZ+Irs0bdSdxnInGxLAMrMgcyM6o0 X-Received: by 2002:a62:65c3:: with SMTP id z186-v6mr2167645pfb.206.1540915543632; Tue, 30 Oct 2018 09:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540915543; cv=none; d=google.com; s=arc-20160816; b=wR0ud34YCvX9Z52H6osDVO+N4PZb6O55hqNWgocQ0BD6c1HNY0E2Y6lgGo30c5zHgS q/IURTX57EEu8PKHtoP+4Tl2LQuWBhFt5BsrqG4k72Ot3nRgv+jskJyBZWiS+BIab7qL i7CNuvE2dWXo+QWAYl16i0b9EoW6T1I1HqYjzxq9BjEZowOM++N5GKauWkFfkX/t/vvu civFEtcJdE3VoCOqjpDkcJ5wznT/9jdlahyK1xW4l2pBdGNfjOqXrwJXF8VtaNZdqGVb iX7b3AD6dGbhgBs9XoDZS5xjg+T/IaIxliZjGH0Pk6XB3JmWkyDGR1tFj4cLJteyBjrW +hdg== 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:references:cc:to:from:subject; bh=eUUWXsHyPEdsJNyTQsdt8A4rZRWlaB55E03Ok6c9p0k=; b=OXmgVPnrRr5be7J8e2Y9BQbCqzNPezlExKUZbsGQyPlHxwNXYdz9QmFiqH7mk0vgAQ Szbdz8oKxbdnDpytmFI9+iaToaxzwAPVcvC0pI+3PL2huow9IxK56RCJ/NH47sp78GUV I0wffiusa38XWCRCFk/E+7paWiMBDE/fTREQWMx2aMp6LmWGv04hxff5IY8CPxSgnNxZ 4xlQDMdCNINFJKN1BdhW8bM+G9Rpj3P73oM41O6GYnH1Bra93SFSail9ai4rvfWHu+0e bCjcPscpWLsJbUpe10c4hreKbvZwmIFYi09hA3/5bnGTCAyA5nHLdrBWAG7oABpw2NIF s+AQ== 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 p20-v6si524808plq.379.2018.10.30.09.05.24; Tue, 30 Oct 2018 09:05:43 -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 S1727805AbeJaA4G (ORCPT + 99 others); Tue, 30 Oct 2018 20:56:06 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:40081 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbeJaA4G (ORCPT ); Tue, 30 Oct 2018 20:56:06 -0400 Received: by mail-wm1-f68.google.com with SMTP id b203-v6so11885891wme.5 for ; Tue, 30 Oct 2018 09:02:02 -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:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eUUWXsHyPEdsJNyTQsdt8A4rZRWlaB55E03Ok6c9p0k=; b=jbrKm0aS0nGkLeDEuc4gIX1dAGwG9zGZ8bMMf9oM79ghPi2PTxoQBRVOgwuCXyu1pv 46gLI3ux6c+0Cc4RNgxOsGU6n3M8E7ma5qPMZQPZxEPSD2gMSsJYQassc2KDnTW3yILG rxPTuR3awACrqH3ITqXItPRjB3+9vPgjqG+eGTu2msH/0D52eGkLAlZof3oh6u7qO82E j3wL7hdmprzPp4Lo6FGJFpuAIIfr6ntlTisohcB5aAKkt3IDo5quGkwdqgsGpUJDmZ/D fIUdBY+4Ouu614PVfT2AS66kTqLir5m27ECGx3O4H5V1/kuj98Gw3z+37pzDCS1YCJa0 oYGA== X-Gm-Message-State: AGRZ1gINsoMbY4alcYfKXv4fCWB1erXW4ABdCBGhUB9ysy1C7dnc/iGs Sck5mOiX0vjcBD4aNTcC8ar/iA== X-Received: by 2002:a1c:e456:: with SMTP id b83-v6mr2230726wmh.143.1540915321602; Tue, 30 Oct 2018 09:02:01 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id i7-v6sm27262444wmd.41.2018.10.30.09.02.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 09:02:00 -0700 (PDT) Subject: Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL) From: Hans de Goede To: Pierre-Louis Bossart , Dean Wallace Cc: Andy Shevchenko , Stephen Boyd , Michael Turquette , linux-clk , Stable , Johannes Stezenbach , Carlo Caione , Andy Shevchenko , Linux Kernel Mailing List , Mogens Jensen References: <20181025232517.ywnw54qibemosjws@picard> <154083512089.98144.9141070901932719147@swboyd.mtv.corp.google.com> <20181029190819.2ivlx73n6y6sx4vk@picard> <20181030143836.feo7zcxiestylxoo@picard> <2d429c87-24c5-4075-683e-b0d12c3eb1c2@linux.intel.com> Message-ID: <783f17c2-ecc6-00fc-5629-02319b965205@redhat.com> Date: Tue, 30 Oct 2018 17:02:00 +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: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 30-10-18 16:46, Hans de Goede wrote: > Hi, > > On 30-10-18 16:04, Pierre-Louis Bossart wrote: >> >> On 10/30/18 9:38 AM, Dean Wallace wrote: >>> On 30-10-18, Hans de Goede wrote: >>>> Hi Dean, >>>> >>>> Attached are 2 different attempts at fixing this. >>>> >>>> When trying these patches do not forget to remove the revert of the >>>> "Stop-marking-clocks-as-CLK_IS_CRITICAL" commit. >>>> >>>> Please first try the 0001-ASoC-intel-cht_bsw_max98090_ti-Use-pmc_plt_clk_0-ins.patch >>>> patch I expect that one to do the trick indicating that the Swanky model >>>> uses a different pmc clk then which is normally used for the codec clock. >>>> >>>> If that patch does not fix things, please give the other patch a try. >> >> For Baytrail devices, the audio platform clocks are not managed by the firmware. They are for CHT-based devices - as can be seen by clock resources being described in the DSDT. We used to have a if(baytrail) in the code which was replaced by this CRITICAL label, but the point remains that there is a difference between the two SOC versions. > > As I mentioned before the CRITICAL flag was only added a year ago to workaround > an issue with on board ethernet needing plt_clk_4 on some laptops, this never > had anything to do with sound. Ah I see now that you later made some changes based on the patch to fix the ethernet: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=7735bce05a9c0bb0eb0f08c9002d65843a7c5798 Note though that that does not touch the machine driver which we are discussing now and the reporters machine is also BYT based. As explained below (in my original reply) I think it is fine to always manage the clk from within the kernel. But if you think this is a bad idea, we could re-introduce the is_valleyview() checks in machine drivers which are used on CHT devices. >> In addition I am not aware of any baytrail device using plt_clk_0, so moving a common machine driver such a cht_bsw_max98090_ti to use plt_clk0 only would break other devices (e.g. Rambi/Orco). Asking for both clocks to be on might work though, > > Ok, so we need to have a DMI based quirk for the Swanky and maybe also > the clapper to use plt_clk_0 there. Asking for 2 clks if we only need > one does not seem like a good plan. > >> however you still have the problem of trying to manage from the kernel what the firmware already manages. > > The firmware only manages it when going to D3 state, with ASoC most of > the codecs gets turned off (and we no longer need the clock) but we do > not put the device in D3 / execute the _PS3 method. So from a pm pov > it is better if we manage the clk ourselves. > > Once we do actually put the device in D3 (on suspend) the kernel will have > already turned off the clk and the _OFF method of the CLK3 power resource > which directly pokes mmio, will just set the enable bit to 0 when it > already is 0, so no problem. Regards, Hans