All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Cc: agross@kernel.org, bjorn.andersson@linaro.org,
	lgirdwood@gmail.com, robh+dt@kernel.org, plai@codeaurora.org,
	bgoswami@codeaurora.org, perex@perex.cz, tiwai@suse.com,
	srinivas.kandagatla@linaro.org, rohitkr@codeaurora.org,
	linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	swboyd@chromium.org, judyhsiao@chromium.org,
	Venkata Prasad Potturu <quic_potturu@quicinc.com>
Subject: Re: [RESEND, v9 06/10] ASoC: qcom: Add regmap config support for codec dma driver
Date: Fri, 10 Dec 2021 19:06:25 +0000	[thread overview]
Message-ID: <YbOlMdiRc0Xirajz@sirena.org.uk> (raw)
In-Reply-To: <1638800567-27222-7-git-send-email-quic_srivasam@quicinc.com>

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

On Mon, Dec 06, 2021 at 07:52:43PM +0530, Srinivasa Rao Mandadapu wrote:

> +static bool __lpass_rxtx_regmap_accessible(struct device *dev, unsigned int reg, bool rw)
> +{
> +	struct lpass_data *drvdata = dev_get_drvdata(dev);
> +	struct lpass_variant *v = drvdata->variant;
> +	int i;
> +
> +	for (i = 0; i < v->rxtx_irq_ports; ++i) {

> +	for (i = 0; i < v->rxtx_rdma_channels; ++i) {

This is looking relatively expensive to run with all these loops -
there's a reason these are normally written as switch statements, the
theory being that the compiler will generate something at least as good
as any data structure we're likely to code.  It's not a *problem*
exactly, but if you're doing anything that ends up querying properties a
lot it might be an issue.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	bgoswami@codeaurora.org,
	Venkata Prasad Potturu <quic_potturu@quicinc.com>,
	linux-arm-msm@vger.kernel.org, plai@codeaurora.org,
	tiwai@suse.com, lgirdwood@gmail.com, robh+dt@kernel.org,
	bjorn.andersson@linaro.org, agross@kernel.org,
	rohitkr@codeaurora.org, swboyd@chromium.org,
	judyhsiao@chromium.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND, v9 06/10] ASoC: qcom: Add regmap config support for codec dma driver
Date: Fri, 10 Dec 2021 19:06:25 +0000	[thread overview]
Message-ID: <YbOlMdiRc0Xirajz@sirena.org.uk> (raw)
In-Reply-To: <1638800567-27222-7-git-send-email-quic_srivasam@quicinc.com>

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

On Mon, Dec 06, 2021 at 07:52:43PM +0530, Srinivasa Rao Mandadapu wrote:

> +static bool __lpass_rxtx_regmap_accessible(struct device *dev, unsigned int reg, bool rw)
> +{
> +	struct lpass_data *drvdata = dev_get_drvdata(dev);
> +	struct lpass_variant *v = drvdata->variant;
> +	int i;
> +
> +	for (i = 0; i < v->rxtx_irq_ports; ++i) {

> +	for (i = 0; i < v->rxtx_rdma_channels; ++i) {

This is looking relatively expensive to run with all these loops -
there's a reason these are normally written as switch statements, the
theory being that the compiler will generate something at least as good
as any data structure we're likely to code.  It's not a *problem*
exactly, but if you're doing anything that ends up querying properties a
lot it might be an issue.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-12-10 19:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 14:22 [RESEND, v9 00/10] Add support for audio on SC7280 based targets Srinivasa Rao Mandadapu
2021-12-06 14:22 ` [RESEND, v9 01/10] ASoC: qcom: SC7280: Update config for building codec dma drivers Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-06 14:22 ` [RESEND, v9 02/10] ASoC: qcom: Move lpass_pcm_data structure to lpass header Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-06 14:22 ` [RESEND, v9 03/10] ASoC: qcom: lpass: Add dma fields for codec dma lpass interface Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-06 14:22 ` [RESEND, v9 04/10] ASoC: qcom: Add helper function to get dma control and lpaif handle Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-06 14:22 ` [RESEND, v9 05/10] ASoC: qcom: Add register definition for codec rddma and wrdma Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-06 14:22 ` [RESEND, v9 06/10] ASoC: qcom: Add regmap config support for codec dma driver Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-10 19:06   ` Mark Brown [this message]
2021-12-10 19:06     ` Mark Brown
2021-12-06 14:22 ` [RESEND, v9 07/10] ASoC: qcom: Add " Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-06 14:22 ` [RESEND, v9 08/10] ASoC: qcom: Add lpass CPU driver for codec dma control Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-06 14:22 ` [RESEND, v9 09/10] ASoC: dt-bindings: Add SC7280 lpass cpu bindings Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2021-12-10 18:45   ` Rob Herring
2021-12-10 18:45     ` Rob Herring
2021-12-06 14:22 ` [RESEND, v9 10/10] ASoC: qcom: lpass-sc7280: Add platform driver for lpass audio Srinivasa Rao Mandadapu
2021-12-06 14:22   ` Srinivasa Rao Mandadapu
2022-02-24 22:59 ` [RESEND, v9 00/10] Add support for audio on SC7280 based targets Mark Brown

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=YbOlMdiRc0Xirajz@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=agross@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=judyhsiao@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=plai@codeaurora.org \
    --cc=quic_potturu@quicinc.com \
    --cc=quic_srivasam@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=rohitkr@codeaurora.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=swboyd@chromium.org \
    --cc=tiwai@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.