Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1407302ybt; Thu, 18 Jun 2020 08:02:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweZYToBTVBxvYFYwAWlenliKETdYTWrEJOdzve1Ydm1z6I0s8Y5vBbu7QBj+ZPjSFFVLFD X-Received: by 2002:a17:906:468e:: with SMTP id a14mr4285677ejr.124.1592492530657; Thu, 18 Jun 2020 08:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592492530; cv=none; d=google.com; s=arc-20160816; b=Wp3Cs656857ZZQVIAVx6wOBL/tVIwk4ETDF/UxCXzaUAMmmHzF0FxBTEjOUKep9f8e BTIa34ZrxKpHcQrwwB+Kr5C5ZooQIFn2sYYgzZB+TGvsiH9EVIK4kP6ISMbXlV4qC8JQ +pn4AE5s0rg8Zs0VzHnhORFDeV/EcbjUB9HowWvwFaQjZUBbouzKauUNTes6XA/k+GIY 64jf0sAYiyfDS5AyQv5uoQZY7BuXf84rntUzMLZsNPM35bllwEmk1BMKbQGfVUVYiS41 rN+h5tj/ToE6QsujJ1toinhtrccRUfYImD3C3gr894QjjfVlNLvyYFED+JYU2DPUn1/G xx0A== 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:ironport-sdr:ironport-sdr; bh=1zdpEWsq00uoYw8FoeFOeN7J90MkNelGqHcHDojbiBw=; b=Jr6yw4HQLaK7QnvZjnXERB3YRxQzPcELlKSR2J3L2tZ6dfQl0H5DHsQU9eUmMCQgKM +IJ/OIQlzqdQcQ68DlpoYGDomcfdMNzYJL8FlFsaSdW/uuXy3fTTsuvS9uZdGLtiwNpn PA5IhGIMJJLLgiPyA6vVrkMtely5jsgbJTylQSVtmZKC6CeYHW4hi6T5c/xFADiuTPA/ 6fgmHxXys/ANl+Qw2EZisWEONi/b+JoDjIcbJhcXk01Wvpxp8KMIPi/XcrjJncpu91Bf +f7dWar4NYk6WCflBl9FDve7DYVbV+RwBGamKeRZZwdUoPzu+YQ2ENQjdkl5WnxvOeUI xsJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si2193565edr.605.2020.06.18.08.01.41; Thu, 18 Jun 2020 08:02:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731365AbgFRO4c (ORCPT + 99 others); Thu, 18 Jun 2020 10:56:32 -0400 Received: from mga06.intel.com ([134.134.136.31]:8231 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731358AbgFRO4b (ORCPT ); Thu, 18 Jun 2020 10:56:31 -0400 IronPort-SDR: /GteYJRBRoJQ8ntY1U7Xgq0XOMv2CHznKoN7+sjgNUCVaY2Eeo5LdzXqWNJPXfzyVu7h6jCGZs xVGTIGCJxqCw== X-IronPort-AV: E=McAfee;i="6000,8403,9655"; a="204091029" X-IronPort-AV: E=Sophos;i="5.75,251,1589266800"; d="scan'208";a="204091029" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 07:56:30 -0700 IronPort-SDR: WRstlpxjt1sMiABU5OkC+WJgszXlBw0nMBk48hg8Q7MDBFZqPvdQEIFlqjkyo1iJjLy/U5lIEu 9HqF1/d3cd7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,251,1589266800"; d="scan'208";a="477268245" Received: from richard2-mobl.amr.corp.intel.com (HELO [10.254.109.110]) ([10.254.109.110]) by fmsmga005.fm.intel.com with ESMTP; 18 Jun 2020 07:56:29 -0700 Subject: Re: [PATCH AUTOSEL 5.7 055/388] ASoC: SOF: Do nothing when DSP PM callbacks are not set To: Daniel Baluta , Mark Brown , Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Kai Vehmanen , Ranjani Sridharan , sound-open-firmware@alsa-project.org, alsa-devel@alsa-project.org References: <20200618010805.600873-1-sashal@kernel.org> <20200618010805.600873-55-sashal@kernel.org> <20200618110126.GC5789@sirena.org.uk> <1d1041f9-521b-98f5-a6ef-12d43615bc13@nxp.com> From: Pierre-Louis Bossart Message-ID: Date: Thu, 18 Jun 2020 08:56:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <1d1041f9-521b-98f5-a6ef-12d43615bc13@nxp.com> Content-Type: text/plain; charset=windows-1252; 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 On 6/18/20 6:44 AM, Daniel Baluta wrote: > On 6/18/20 2:01 PM, Mark Brown wrote: >> On Wed, Jun 17, 2020 at 09:02:32PM -0400, Sasha Levin wrote: >>> From: Daniel Baluta >>> >>> [ Upstream commit c26fde3b15ed41f5f452f1da727795f787833287 ] >>> >>> This provides a better separation between runtime and PM sleep >>> callbacks. >>> >>> Only do nothing if given runtime flag is set and calback is not set. >>> >>> With the current implementation, if PM sleep callback is set but runtime >>> callback is not set then at runtime resume we reload the firmware even >>> if we do not support runtime resume callback. >> This doesn't look like a bugfix, just an optimization? > > Indeed can be seen as an optimization, but it does unexpected things > which can cause trouble > > and weird behavior for people not familiar with the matter. > > For example, as explained in the commit message if you only provide > > System PM handler but not runtime PM handler, then the DSP will be resetted > > even if this is not the intention. I think it's a bug fix for Intel legacy platforms (Baytrail, Broadwell) where runtime_pm isn't supported. However the additional fixes for system suspend/resume were only provided for 5.8, so this patch in isolation will not do much for those platforms. Put differently, even if this patch is applied to 5.7 suspend/resume would still not work for Baytrail/Broadwell. Daniel, your call if you need this for i.MX?