stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
	Dean Wallace <duffydack73@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	Stable <stable@vger.kernel.org>,
	Johannes Stezenbach <js@sig21.net>,
	Carlo Caione <carlo@endlessm.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mogens Jensen <mogens-jensen@protonmail.com>
Subject: Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL)
Date: Tue, 30 Oct 2018 11:27:51 -0500	[thread overview]
Message-ID: <fe975fde-836a-8d24-46ca-55b02db06b45@linux.intel.com> (raw)
In-Reply-To: <783f17c2-ecc6-00fc-5629-02319b965205@redhat.com>


On 10/30/18 11:02 AM, Hans de Goede wrote:
> 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.

I am having difficulties following the proposal

for audio, managing the platform clocks from the kernel is only useful 
for Baytrail, and the code handling the CRITICAL flags is really 
equivalent to having a is_valleyview() test in the machine drivers. I 
don't quite understand the S0ix-related changes and I also don't get how 
using plt_clk_0 makes things better or wonder if audio on Swanky worked 
before the commit 7735bce05a9c ('ASoC: Intel: boards: use devm_clk_get() 
unconditionally'.

In other words, I don't know if we are dealing with a platform that only 
started working with 7735bce05a9c and does need a quirk to make use of 
plt_clk_0 or a fundamental issue with clock/power management.


>
>>> 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

  reply	other threads:[~2018-10-31  1:22 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181025232517.ywnw54qibemosjws@picard>
2018-10-29 17:45 ` Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL) Stephen Boyd
2018-10-29 17:52   ` Andy Shevchenko
2018-10-29 18:04     ` Andy Shevchenko
2018-10-29 19:08       ` Dean Wallace
2018-10-29 22:03         ` Pierre-Louis Bossart
2018-10-30 10:17           ` Hans de Goede
2018-10-30 11:05             ` Hans de Goede
2018-10-30 16:24               ` Andy Shevchenko
2018-10-30 11:19           ` Hans de Goede
2018-10-30 14:38             ` Dean Wallace
2018-10-30 14:48               ` Hans de Goede
2018-10-30 15:03                 ` Andy Shevchenko
2018-10-30 15:25                   ` Pierre-Louis Bossart
2018-10-30 15:04               ` Pierre-Louis Bossart
2018-10-30 15:46                 ` Hans de Goede
2018-10-30 16:02                   ` Hans de Goede
2018-10-30 16:27                     ` Pierre-Louis Bossart [this message]
2018-10-30 18:31                       ` Hans de Goede
2018-10-30 16:03                   ` Pierre-Louis Bossart
2018-10-30 16:04                   ` Hans de Goede
2018-10-30 16:15                     ` Dean Wallace
2018-10-31 11:04                       ` Hans de Goede
2018-10-31 12:45                         ` Dean Wallace
2018-10-31 20:07                         ` Dean Wallace
2018-10-31 22:27                           ` Pierre-Louis Bossart
2018-10-31 23:57                             ` Dean Wallace
2018-11-01 10:37                             ` Dean Wallace
2018-11-01 13:57                               ` Hans de Goede
2018-11-01 14:28                                 ` Dean Wallace
2018-11-01 14:49                                   ` Hans de Goede
2018-11-01 15:29                                     ` Dean Wallace
2018-11-01 15:39                                     ` Dean Wallace
2018-11-01 15:50                                     ` Dean Wallace
2018-11-02 10:27                                       ` Hans de Goede
2018-11-02 11:15                                         ` Dean Wallace
2018-11-01 13:56                             ` Hans de Goede
2018-10-30 18:56                     ` Mogens Jensen
2018-10-30 19:10                       ` Hans de Goede
2018-10-31  6:02                         ` Mogens Jensen
2018-10-31  9:29                           ` Hans de Goede
2018-10-31 10:03                             ` Dean Wallace
2018-11-01  6:55                             ` Mogens Jensen
2018-12-02 12:25                               ` Hans de Goede
2019-01-17  5:58                                 ` Mogens Jensen
2019-01-17  9:12                                   ` Dean Wallace
2019-01-17 12:05                                     ` Hans de Goede
2019-01-17 13:05                                       ` Johannes Stezenbach
2019-01-17 13:16                                       ` Dean Wallace
2019-01-18 15:33                                         ` Hans de Goede
2019-01-17 19:30                                       ` Mogens Jensen
2019-01-18 15:35                                         ` Hans de Goede
2019-01-21  5:55                                           ` Mogens Jensen
2019-01-22 19:27                                             ` Pierre-Louis Bossart
2019-01-25  5:16                                               ` Mogens Jensen
2019-01-25 14:12                                                 ` Pierre-Louis Bossart
2019-01-25 17:57                                                 ` Pierre-Louis Bossart
2019-01-25 20:30                                                   ` Andy Shevchenko
2019-01-24 10:35                                             ` Hans de Goede

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=fe975fde-836a-8d24-46ca-55b02db06b45@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=carlo@endlessm.com \
    --cc=duffydack73@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=js@sig21.net \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mogens-jensen@protonmail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=stable@vger.kernel.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).