From patchwork Wed Jul 12 18:29:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13310810 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 073BBEB64DA for ; Wed, 12 Jul 2023 18:31:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CE0B93E7; Wed, 12 Jul 2023 20:30:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CE0B93E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689186707; bh=zqU6ZAcQQBHsvS/rJLsgJS0viL/KP5Cepdvd2B5dJcQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JXkWVnA7vmXdRxkaWzzhV3lUm1IIXG1xlDhOzUtoI9G3yqrhL7h8VR+dMsr4BBWyn YZAqjYWG6hB/MSihe/qi1h5u7BvppK9UdeccVjgwmBt9CwKYsZIn0YPWtqGHaHvQ3+ CRgavZjPAOQgCTT32wtBnCSVdH3WVMl1E7ppR/tQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BEAF7F8055C; Wed, 12 Jul 2023 20:30:07 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6C91EF80552; Wed, 12 Jul 2023 20:30:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 39F6DF80290; Wed, 12 Jul 2023 20:30:04 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4FA18F80093 for ; Wed, 12 Jul 2023 20:29:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4FA18F80093 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=W4Cloz0U Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 712F2618CD; Wed, 12 Jul 2023 18:29:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EF7BC433C9; Wed, 12 Jul 2023 18:29:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689186591; bh=zqU6ZAcQQBHsvS/rJLsgJS0viL/KP5Cepdvd2B5dJcQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=W4Cloz0UK9E0Dd5dBpHYqymNWw5vlr5q4enTRnbMh1lTLB8ffiE0tjKs5rD/6g/iy vxzHr2h3g4dKjErrBRGIfzj+D4/lf5ZZAc3dDnQ6a80L9elntVq2EzTHzmr7Fzu79B 5LWbH8HS9QRmiKcw1DtI/2o2MPPSE0TujAaZ2n3Mm2zy/wXPjOBo3+gxkvfaXuu8k7 MkZE2zNyMuwWvmn+tIcK7o/tJlSxt3lw+0g887bloE6w9KMde0oRo/+Vh2dlBoEF6h BUmMZgSuV5IBV9yJm1Nfvp64iIXUQKmzCAtgO+l3Bmq7dQheVZSlY4tLfWVVHiePCN vXqXksFkq64lw== From: Mark Brown Date: Wed, 12 Jul 2023 19:29:32 +0100 Subject: [PATCH 1/4] ASoC: wcd9335: Update to use maple tree register cache MIME-Version: 1.0 Message-Id: <20230712-asoc-qcom-maple-v1-1-15f8089664b9@kernel.org> References: <20230712-asoc-qcom-maple-v1-0-15f8089664b9@kernel.org> In-Reply-To: <20230712-asoc-qcom-maple-v1-0-15f8089664b9@kernel.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood Cc: alsa-devel@alsa-project.org, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1148; i=broonie@kernel.org; h=from:subject:message-id; bh=zqU6ZAcQQBHsvS/rJLsgJS0viL/KP5Cepdvd2B5dJcQ=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBkrvEXV8JwsoM63+tHO/NLv97Czee2dPP9LCzK7 lZSg4ycsi6JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZK7xFwAKCRAk1otyXVSH 0DvQB/9pCUTYPFhfMCDWL1lXoLGRshtzejNjUiy2T/8v+fcEVa3PbW96lln7mlujNocP+P+217W iR6lcCzAkl71Ztd+sfaux/miROKLrvMIdcj3Eg3PJOaFibjbq221bVnh5Gw4GOT1EPyuabB2gfG QVdnOUx0FIzt0sAK5rY1pGnQA52UbTCoKQsCNyA/crLRQIZTOdPj+lE2JR4Z/eZ/kr03UpRgEB1 lywRDjzeauWzMhfwFpSVF2QXvqrtXfDlJJM9gA5K5QR5xx/TK5QjcmY8Kxp8cTygkkK4MmiJypj cbuKOKYCq8cbeQQ9HMAo7/1cpiBgLoIoEfYIh51IOBjESPRJ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: HWMB4RCKSYRHE6IZDB562NY7P3DKTCFM X-Message-ID-Hash: HWMB4RCKSYRHE6IZDB562NY7P3DKTCFM X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wcd9335 driver to use the more modern data structure. Signed-off-by: Mark Brown --- sound/soc/codecs/wcd9335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 8bf3510a3ea3..a05b553e6472 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -4968,7 +4968,7 @@ static bool wcd9335_is_volatile_register(struct device *dev, unsigned int reg) static struct regmap_config wcd9335_regmap_config = { .reg_bits = 16, .val_bits = 8, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .max_register = WCD9335_MAX_REGISTER, .can_multi_write = true, .ranges = wcd9335_ranges, From patchwork Wed Jul 12 18:29:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13310812 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C328EB64DD for ; Wed, 12 Jul 2023 18:32:15 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AA4DF868; Wed, 12 Jul 2023 20:31:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AA4DF868 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689186733; bh=WS8PaoZNPLFN03memDB7SybaCgv4N4UDqWVOcfkG0pw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=nElyC2roE8z4njVTH6oqPMxL9HAoNRRvPiMnemeQuNrIvLYVsKCO/n4z/x4wfleH1 D6Jum8YUaG/wxNevunghBYO4Ax2BNhr1iMAfSFVx5nb2198EKzF8qSXUj53gyYEJQp PGZZjiqfrmNhRFS/q6y/a4aofMsOleZBCoRKWDbY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1B60DF8057B; Wed, 12 Jul 2023 20:30:12 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6B8ACF80564; Wed, 12 Jul 2023 20:30:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5CB0AF80564; Wed, 12 Jul 2023 20:30:08 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D426BF80236 for ; Wed, 12 Jul 2023 20:29:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D426BF80236 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=mp1KGQry Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4B6A8618D1; Wed, 12 Jul 2023 18:29:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 680C0C433C8; Wed, 12 Jul 2023 18:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689186593; bh=WS8PaoZNPLFN03memDB7SybaCgv4N4UDqWVOcfkG0pw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=mp1KGQryyfJ643/trDhX0i4T03LcuSWxvHlnZ6SiSl3CFwIzidPNMY5at/dIUbJi3 ISnSWP4TyYc319zKK/aAAd5oUTwm+LTHwisXUsn0kq4Pw7YsFauWyZ9uGD5tewVt4A LbOGyxdc9KT+W6nzq0t9hYV08xUPT/VcInFFMNxRHRRA9MuRcsCZ1gp6grvgb/Zllt V3ZogsOurXRYINdsFsXlx18FhtnuLYxPNTP0R+6pr8aEEgM1PAenmzc7G/rzHnYBDX hP7LkbCfsNs9tynR7+j2TYG+Y/vbyQCLNHrnMivnhmYonIxl+pEGxf7g1Jurq71OVB glIABoNgRuCAw== From: Mark Brown Date: Wed, 12 Jul 2023 19:29:33 +0100 Subject: [PATCH 2/4] ASoC: wcd938x: Update to use maple tree register cache MIME-Version: 1.0 Message-Id: <20230712-asoc-qcom-maple-v1-2-15f8089664b9@kernel.org> References: <20230712-asoc-qcom-maple-v1-0-15f8089664b9@kernel.org> In-Reply-To: <20230712-asoc-qcom-maple-v1-0-15f8089664b9@kernel.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood Cc: alsa-devel@alsa-project.org, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1152; i=broonie@kernel.org; h=from:subject:message-id; bh=WS8PaoZNPLFN03memDB7SybaCgv4N4UDqWVOcfkG0pw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBkrvEY5B1iAnchhOKLen+ktMTjAFtAkfuAM2uJD qVG1hli8zeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZK7xGAAKCRAk1otyXVSH 0EJLB/9QB+7HqQR7MZOjgT8Jfe8oq+u3bkvP8YxO+7YAP3+k0tRAjb1kLOUcCqq2vAurl0FW2dP XEqqOw/9THxMvP8uuf77oi9UlzLeuLRzdSg2FC4FeZlRapctO4UYpM0m15JTeaUpv0CV0M2/SF9 SvE5AermLcaBcmm0q94X9qkLzY5nrODlCyHFF3yO1cWhzjFdStFiB89x7Scv5fpASzQT2LZdlph 3lxffl9o1oC83vGPTlhKpaFy3rxZC0mYRBjDRmASy+OmVXMi4RgYr6d2KcTsGo5+RBKnKYffDDD x9lDD9uhlHtJnGZ0tAU+HcLwTg8E00dOciYHM3u1470Q+wmO X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: 2ZZPPKRUWQGFC2TVLSETTVNJSWXUBGUQ X-Message-ID-Hash: 2ZZPPKRUWQGFC2TVLSETTVNJSWXUBGUQ X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wcd938x driver to use the more modern data structure. Signed-off-by: Mark Brown --- sound/soc/codecs/wcd938x-sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd938x-sdw.c b/sound/soc/codecs/wcd938x-sdw.c index bd0e9fbc12eb..6951120057e5 100644 --- a/sound/soc/codecs/wcd938x-sdw.c +++ b/sound/soc/codecs/wcd938x-sdw.c @@ -1183,7 +1183,7 @@ static const struct regmap_config wcd938x_regmap_config = { .name = "wcd938x_csr", .reg_bits = 32, .val_bits = 8, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wcd938x_defaults, .num_reg_defaults = ARRAY_SIZE(wcd938x_defaults), .max_register = WCD938X_MAX_REGISTER, From patchwork Wed Jul 12 18:29:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13310811 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5994EB64DA for ; Wed, 12 Jul 2023 18:31:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 99D0983E; Wed, 12 Jul 2023 20:31:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 99D0983E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689186713; bh=Yi+sAb3AUcr+rzeCFuKWfBtZBXLt+YKwOAZ1mGigjB4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DMctMgRTdfW8OJDeY1hL7DaXIoISEjIgU/Hj2NeZp47Bvf8AvBfWo3F1S4Tk8tLQ1 okMMxzzbR5+ei7h2pVRPBGhIWizgap0R7TDclVprHpfCp5kK8/3J/v4rrhO5WtxlOH fAKHraQwlIOalirv3pePkApAoG+lWBidlXL/9sxA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5F929F80578; Wed, 12 Jul 2023 20:30:10 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DEE76F80564; Wed, 12 Jul 2023 20:30:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2D5B2F80551; Wed, 12 Jul 2023 20:30:06 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4C003F8024E for ; Wed, 12 Jul 2023 20:29:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4C003F8024E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=gOZSsUBJ Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3BC0C618BF; Wed, 12 Jul 2023 18:29:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41BF0C433C9; Wed, 12 Jul 2023 18:29:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689186595; bh=Yi+sAb3AUcr+rzeCFuKWfBtZBXLt+YKwOAZ1mGigjB4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=gOZSsUBJvcFvXH/bVjRq+KhDTtlf949bf6coTAiH6nyCFJGw+hiDDb64YzV3G6hSt OBaUK6cusCLC4/oFeFzL2GKJWn7O/7v5r+H+9zvT24BWOCNLE2U/7A3WFQ25GfxuHG soczblLYCzr1lgx/nuCljUgWuNCP2myZf2M0cQ7aWLuxDdKk80qVhganPAmIwjhn+f j3WxyL52OeiAibIYfv0qlD3jQcEwsLrzP7dlSvSXYIzdH3JQODHamJeLMy8ALrUoJm 7Ba6v3owAt8iubvsArva2XJJpHW5iRYTvVbWQlV4OjAqQBrXZ6IW546JTG8CCx3sgu IUVnOyWqUlqnQ== From: Mark Brown Date: Wed, 12 Jul 2023 19:29:34 +0100 Subject: [PATCH 3/4] ASoC: wsa881x: Update to use maple tree register cache MIME-Version: 1.0 Message-Id: <20230712-asoc-qcom-maple-v1-3-15f8089664b9@kernel.org> References: <20230712-asoc-qcom-maple-v1-0-15f8089664b9@kernel.org> In-Reply-To: <20230712-asoc-qcom-maple-v1-0-15f8089664b9@kernel.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood Cc: alsa-devel@alsa-project.org, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1176; i=broonie@kernel.org; h=from:subject:message-id; bh=Yi+sAb3AUcr+rzeCFuKWfBtZBXLt+YKwOAZ1mGigjB4=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBkrvEZIQvEvY0XXjd4HOMqjlyy+CL3W8WtrpMAi 7SDeDeP3iiJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZK7xGQAKCRAk1otyXVSH 0PnFB/0UcDrgvnx2YLqAbbV4KWZYy3iPKSpyn+S5czA+j59Gn+tvkwid5EUxHAQ9Khxk1TwVw57 MGfCxa2IVIpSTPM1Noqjd5iau2HH6dDwi3ZcTvvfyf1gr06pjeVMkVVPvOj1ecegr50Cr2Z3iTP 6sGgyBRU8YrBlu36w4ROnQI7yGmkMyw9oNECMFaMSolWavTm+IF3i2k9DwIS42VjuRAYuRH4Ya3 rNnkSRI60GOv+cE5QRFioYDuqtwVwMN11ao25I378WX+XwTX3p7Gvwbyh2yg+hIjOrsUw+BeVub lhMg6y9/q2+VgiNYOhAcO/VKJit9Vcu0pqNzbS9mXe9f3wr/ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: HVNO7QLYBVNP6TKAKE3Y2SKOPQ2VCWAN X-Message-ID-Hash: HVNO7QLYBVNP6TKAKE3Y2SKOPQ2VCWAN X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wsa881x driver to use the more modern data structure. Signed-off-by: Mark Brown --- sound/soc/codecs/wsa881x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c index 97f6873a0a8c..3c025dabaf7a 100644 --- a/sound/soc/codecs/wsa881x.c +++ b/sound/soc/codecs/wsa881x.c @@ -637,7 +637,7 @@ static bool wsa881x_volatile_register(struct device *dev, unsigned int reg) static struct regmap_config wsa881x_regmap_config = { .reg_bits = 32, .val_bits = 8, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wsa881x_defaults, .max_register = WSA881X_SPKR_STATUS3, .num_reg_defaults = ARRAY_SIZE(wsa881x_defaults), From patchwork Wed Jul 12 18:29:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13310813 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 51A69EB64DA for ; Wed, 12 Jul 2023 18:32:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C88081F6; Wed, 12 Jul 2023 20:31:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C88081F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689186755; bh=BLhoiooK+SPyBcxQaJ/+z4l8Cf26OHRdpNHT72wlcs0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Oj4CAtDUqL1ZuxN0v6w386imuO3BaaU7ynhvUhOHJGfMkbkyv5gSIuz1UQTOvyMdI 5xApZSq01lIp1HnRhesfGHYwY5MGIo4fGbfYK7Pgs1am6ijo8SB31rgP8KctOMSRxp i2UDPsy1zD5JH4ZMzIHJs81A5INSkQWo3zb/HJn8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81D43F8053B; Wed, 12 Jul 2023 20:31:25 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 10D78F80153; Wed, 12 Jul 2023 20:31:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B69E8F8024E; Wed, 12 Jul 2023 20:31:21 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F40C4F80153 for ; Wed, 12 Jul 2023 20:29:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F40C4F80153 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=kgdUcUPI Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1ADE6618CF; Wed, 12 Jul 2023 18:29:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35179C433CA; Wed, 12 Jul 2023 18:29:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689186597; bh=BLhoiooK+SPyBcxQaJ/+z4l8Cf26OHRdpNHT72wlcs0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kgdUcUPIVv9YynUsB1kng6rQKyeFEpb60PJIhKpj0aQcW49LNZ96A6M+0cgEQg0Z0 6i/sRgoshb7bSa+etncVOhj+Bw+jtXFJOgdT/AqzPoAi4TeXpmvIWxl+ne4cba+PfL e3CF3+tT3vcJB3M84XHhvvd8KIGi3Jp2z2ujcaepZQP+seuGjtL8xnN2IUBewPlQ7/ TKY8qVg9y4zs+6ntbKuynV9sZIiPc0ipZWoI7jTm/pob5090XAQM8AYLmmpUR3/r8Y of5wi/z1gt1BDj9fuxpurnufY/I7LVCIPdwTgovs8zc4O8pQLn/9BX3R+E8jsNqyyz tCIaueMTBDLgA== From: Mark Brown Date: Wed, 12 Jul 2023 19:29:35 +0100 Subject: [PATCH 4/4] ASoC: wsa883x: Update to use maple tree register cache MIME-Version: 1.0 Message-Id: <20230712-asoc-qcom-maple-v1-4-15f8089664b9@kernel.org> References: <20230712-asoc-qcom-maple-v1-0-15f8089664b9@kernel.org> In-Reply-To: <20230712-asoc-qcom-maple-v1-0-15f8089664b9@kernel.org> To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood Cc: alsa-devel@alsa-project.org, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1176; i=broonie@kernel.org; h=from:subject:message-id; bh=BLhoiooK+SPyBcxQaJ/+z4l8Cf26OHRdpNHT72wlcs0=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBkrvEZfjFyv7JLbFzKwPggiFByT6A17IOr8eOlI nO6WCO/sMeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZK7xGQAKCRAk1otyXVSH 0AzsB/0WW37e0NOO5V+xJ01eFaPW+J39Gu+5QBQBx7Idwfvf/IIilFl08gF+gy2FPvAjEe2X4FQ ihHvNuoWis+SmWx7nz9OpsGG6OD283SiNKT37Q/b72nuGwucHtoOMMjMg7CZHQL0aalv/vVj6N/ nNbiK+V2EnYsM5fApCO1jEjA3eryXyGhTviwzLW/nnmGtJcyKun2ZNbW0rj6nE1OIuSpDLg+xcT c2+MlpWY+bhhYtnlzcknm90mHMnTX3twVqPbRBUGuPP9u5U1bNz7MvpbxK6JJtsTBl7wcH3HP8Q /q/RCEjHE3wmPfmK9ld1RdCW50Ddp2xzvYN3AZwjQVQ7s0cT X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: GML2MNFJSKRRKSVZTV5T7V7D3RAFYYJD X-Message-ID-Hash: GML2MNFJSKRRKSVZTV5T7V7D3RAFYYJD X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. In v6.5 it has also acquired the ability to generate multi-register writes in sync operations, bringing performance up to parity with the rbtree cache there. Update the wsa883x driver to use the more modern data structure. Signed-off-by: Mark Brown --- sound/soc/codecs/wsa883x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index e40d583a1ce6..197fae23762f 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -938,7 +938,7 @@ static bool wsa883x_volatile_register(struct device *dev, unsigned int reg) static struct regmap_config wsa883x_regmap_config = { .reg_bits = 32, .val_bits = 8, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wsa883x_defaults, .max_register = WSA883X_MAX_REGISTER, .num_reg_defaults = ARRAY_SIZE(wsa883x_defaults),