From mboxrd@z Thu Jan 1 00:00:00 1970 From: Huan Wang Subject: Re: [PATCH] audio: sai: Add Power Management support Date: Thu, 30 Oct 2014 14:55:47 +0000 Message-ID: <1414680936299.29360@freescale.com> References: <1414552896-20797-1-git-send-email-b18965@freescale.com>,<20141029113634.GF18557@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <20141029113634.GF18557@sirena.org.uk> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Mark Brown Cc: "perex@perex.cz" , "tiwai@suse.de" , "lgirdwood@gmail.com" , "alsa-devel@alsa-project.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" List-Id: alsa-devel@alsa-project.org SGksCgpPbiBXZWQsIE9jdCAyOSwgMjAxNCBhdCAxMToyMTozNkFNICswODAwLCBBbGlzb24gV2Fu ZyB3cm90ZToKPiBUaGlzIHBhdGNoIGFkZHMgUG93ZXIgTWFuYWdlbWVudCBzdXBwb3J0IGZvciBT QUkuCj4gQWN0aXZhdGUgcmVnbWFwIGNhY2hlIHdpdGggUkVHQ0FDSEVfUkJUUkVFLCBhbmQgdXNl CgpBcmUgeW91IHN1cmUgdGhhdCBSRUdDQUNIRV9SQlRSRUUgaXMgdGhlIGJlc3Qgb3B0aW9uIGhl cmU/ICBGb3IgTU1JTwpkZXZpY2VzIHRoZSBjb3N0IHRyYWRlb2ZmIGZvciB0aGUgcmJ0cmVlIGlz IHVzdWFsbHkgaGlnaGVyIHRoYW4gcGVvcGxlCmxpa2Ugc28gZmxhdCBjYWNoZXMgYXJlIHByZWZl cnJlZC4gIEJ1dCBpZiBpdCB3b3JrcyBmb3IgeW91IHRoYXQncyBmaW5lLAp0aGlzIHNob3VsZG4n dCBiZSAqdGhhdCogcGVyZm9ybWFuY2UgY3JpdGljYWwuCgpJJ20gYWxzbyBhIGJpdCBzdXJwcmlz ZWQgdGhhdCB0aGlzIHdvcmtzIHdpdGhvdXQgcmVnaXN0ZXIgZGVmYXVsdHMgYmVpbmcKcHJvdmlk ZWQgc2luY2Ugd2UgbmVlZCB0byBtYWtlIHN1cmUgd2UgYWxsb2NhdGUgdGhlIHJidHJlZSBub2Rl cyBvdXRzaWRlCm9mIHRoZSBzcGlubG9jayB3ZSB1c2UgdG8gbG9jayBNTUlPIGFjY2VzcyAtIHdh cyB0aGlzIHRlc3RlZCB3aXRoCm1haW5saW5lPwoKW0FsaXNvbiBXYW5nXSBJIHRlc3RlZCByYnRy ZWUgYW5kIGZsYXQgY2FjaGVzLCB0aGV5IGJvdGggd29yay4gQnV0IEkgZGlkbid0IHBheSBhdHRl bnRpb24gdG8gdGhlIGNvc3QgdHJhZGVvZmYgYW5kIHJlZ2lzdGVyIGRlZmF1bHRzIGJlZm9yZSwg c28gSSB0aGluayBmbGF0IGNhY2hlcyBhcmUgcHJlZmVycmVkIG5vdy4gCgpUaGFua3MuCgpCZXN0 IFJlZ2FyZHMsCkFsaXNvbiBXYW5nCg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: alison.wang@freescale.com (Huan Wang) Date: Thu, 30 Oct 2014 14:55:47 +0000 Subject: [PATCH] audio: sai: Add Power Management support In-Reply-To: <20141029113634.GF18557@sirena.org.uk> References: <1414552896-20797-1-git-send-email-b18965@freescale.com>, <20141029113634.GF18557@sirena.org.uk> Message-ID: <1414680936299.29360@freescale.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Wed, Oct 29, 2014 at 11:21:36AM +0800, Alison Wang wrote: > This patch adds Power Management support for SAI. > Activate regmap cache with REGCACHE_RBTREE, and use Are you sure that REGCACHE_RBTREE is the best option here? For MMIO devices the cost tradeoff for the rbtree is usually higher than people like so flat caches are preferred. But if it works for you that's fine, this shouldn't be *that* performance critical. I'm also a bit surprised that this works without register defaults being provided since we need to make sure we allocate the rbtree nodes outside of the spinlock we use to lock MMIO access - was this tested with mainline? [Alison Wang] I tested rbtree and flat caches, they both work. But I didn't pay attention to the cost tradeoff and register defaults before, so I think flat caches are preferred now. Thanks. Best Regards, Alison Wang From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934433AbaJ3Ozw (ORCPT ); Thu, 30 Oct 2014 10:55:52 -0400 Received: from mail-by2on0101.outbound.protection.outlook.com ([207.46.100.101]:51456 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756002AbaJ3Ozv (ORCPT ); Thu, 30 Oct 2014 10:55:51 -0400 X-Greylist: delayed 127997 seconds by postgrey-1.27 at vger.kernel.org; Thu, 30 Oct 2014 10:55:50 EDT From: Huan Wang To: Mark Brown CC: "perex@perex.cz" , "tiwai@suse.de" , "lgirdwood@gmail.com" , "alsa-devel@alsa-project.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] audio: sai: Add Power Management support Thread-Topic: [PATCH] audio: sai: Add Power Management support Thread-Index: AQHP82yXa8Mh/U0xYkW2IwDuBTMksJxIswrW Date: Thu, 30 Oct 2014 14:55:47 +0000 Message-ID: <1414680936299.29360@freescale.com> References: <1414552896-20797-1-git-send-email-b18965@freescale.com>,<20141029113634.GF18557@sirena.org.uk> In-Reply-To: <20141029113634.GF18557@sirena.org.uk> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [221.223.183.133] x-microsoft-antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0692; x-forefront-prvs: 038002787A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(24454002)(199003)(92726001)(92566001)(86362001)(31966008)(101416001)(36756003)(50986999)(76176999)(54356999)(97736003)(117636001)(21056001)(4396001)(64706001)(66066001)(20776003)(95666004)(99286002)(107046002)(106116001)(106356001)(105586002)(85306004)(80022003)(46102003)(110136001)(76482002)(87936001)(77096002)(2656002)(120916001)(85852003)(40100003)(122556002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR0301MB0692;H:BN1PR0301MB0689.namprd03.prod.outlook.com;FPR:;MLV:sfv;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="gb2312" MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id s9UEui8s013129 Hi, On Wed, Oct 29, 2014 at 11:21:36AM +0800, Alison Wang wrote: > This patch adds Power Management support for SAI. > Activate regmap cache with REGCACHE_RBTREE, and use Are you sure that REGCACHE_RBTREE is the best option here? For MMIO devices the cost tradeoff for the rbtree is usually higher than people like so flat caches are preferred. But if it works for you that's fine, this shouldn't be *that* performance critical. I'm also a bit surprised that this works without register defaults being provided since we need to make sure we allocate the rbtree nodes outside of the spinlock we use to lock MMIO access - was this tested with mainline? [Alison Wang] I tested rbtree and flat caches, they both work. But I didn't pay attention to the cost tradeoff and register defaults before, so I think flat caches are preferred now. Thanks. Best Regards, Alison Wang {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I