linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: ulf.hansson@linaro.org, wsa+renesas@sang-engineering.com,
	linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 2/2] mmc: renesas_sdhi: use multiple segments if possible
Date: Mon, 13 May 2019 11:00:54 +0200	[thread overview]
Message-ID: <20190513090054.GA15744@kunai> (raw)
In-Reply-To: <1557721744-30545-3-git-send-email-yoshihiro.shimoda.uh@renesas.com>

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

Hi Shimoda-san,

thank you for this update!

> +static void renesas_sdhi_init_card(struct mmc_host *mmc, struct mmc_card *card)
> +{
> +	struct tmio_mmc_host *host = mmc_priv(mmc);
> +
> +	if (host->pdev->dev.iommu_group &&

I wonder if I am too cautious, but maybe we should have another
condition here to be checked first, namely "host->mmc->max_segs < 512"?

> +	    (mmc_card_mmc(card) || mmc_card_sd(card)))
> +		host->mmc->max_segs = 512;
> +	else
> +		host->mmc->max_segs = host->pdata->max_segs;

max_segs can be 0, so we should probably have:

 +		host->mmc->max_segs = host->pdata->max_segs ?: 32;

That also means, for the sys-dmac and Gen2, we then use 512 for the
IOMMU case and 32 (default TMIO value) for the non IOMMU case. My
understanding is that SYS DMAC can handle 512 in both cases. Maybe it
makes sense then to make an incremental patch setting the max_segs value
explicitly to 512 in the sys-dmac driver for Gen2?

Kind regards,

   Wolfram


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

  reply	other threads:[~2019-05-13  9:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13  4:29 [PATCH v2 0/2] mmc: renesas_sdhi: improve performance by using IOMMU Yoshihiro Shimoda
2019-05-13  4:29 ` [PATCH v2 1/2] mmc: tmio: No memory size limitation if runs on IOMMU Yoshihiro Shimoda
2019-05-13  4:29 ` [PATCH v2 2/2] mmc: renesas_sdhi: use multiple segments if possible Yoshihiro Shimoda
2019-05-13  9:00   ` Wolfram Sang [this message]
2019-05-13  9:46     ` Yoshihiro Shimoda
2019-05-13 11:34       ` Yoshihiro Shimoda
2019-05-13 13:54         ` Wolfram Sang
2019-05-14  6:05       ` Yoshihiro Shimoda
2019-05-21 21:57         ` Wolfram Sang
2019-05-22  5:11           ` Yoshihiro Shimoda

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=20190513090054.GA15744@kunai \
    --to=wsa@the-dreams.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.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 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).