All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Cc: DRI Development <dri-devel@lists.freedesktop.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH v2 1/2] spi: Split spi message into chunks of <65535 in the spi subsystem
Date: Sat, 10 Mar 2018 20:12:29 +0100	[thread overview]
Message-ID: <CAMuHMdV_6zvD+Me7NjVU5-5QM9=WgB0uE_YDotU-YNytGqmNSg@mail.gmail.com> (raw)
In-Reply-To: <26064ccd4a898549fcdecbd5d0a3f32fb0a3ba55.1520691344.git.meghana.madhyastha@gmail.com>

Hi Meghana,

On Sat, Mar 10, 2018 at 4:51 PM, Meghana Madhyastha
<meghana.madhyastha@gmail.com> wrote:
> Split spi messages into chunks of <65535 in the spi subsystem and remove the message
> length warning in bcm2835_spi_can_dma. This is so that the messages can be transferred
> via dma and that the tinydrm drivers need not split it.
>
> Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>

Thanks for your patch!

> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -1242,6 +1242,14 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread)
>         trace_spi_message_start(ctlr->cur_msg);
>
>         if (ctlr->prepare_message) {
> +               gfp_t gfp_flags = GFP_KERNEL | GFP_DMA;
> +               size_t max_transfer_size = 32000;

Do you really want to impose this arbitrary limit (which BTW doesn't match
the value in the patch description) to each and every SPI controller driver?

> +               ret = spi_split_transfers_maxsize(ctlr, ctlr->cur_msg, max_transfer_size, gfp_flags);
> +               if (ret) {
> +                       dev_err(&ctlr->dev,
> +                               "failed to split message\n");
> +                       goto out;
> +               }
>                 ret = ctlr->prepare_message(ctlr, ctlr->cur_msg);
>                 if (ret) {
>                         dev_err(&ctlr->dev, "failed to prepare message: %d\n",

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-03-10 19:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-10 15:50 [PATCH v2 0/2] Chunk splitting of spi transfers Meghana Madhyastha
2018-03-10 15:51 ` [PATCH v2 1/2] spi: Split spi message into chunks of <65535 in the spi subsystem Meghana Madhyastha
2018-03-10 19:12   ` Geert Uytterhoeven [this message]
2018-03-11 13:33   ` Noralf Trønnes
2018-03-10 15:52 ` [PATCH v2 2/2] drm/tinydrm: Remove chunk splitting in tinydrm_spi_transfer Meghana Madhyastha
2018-03-11 13:35   ` Noralf Trønnes

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='CAMuHMdV_6zvD+Me7NjVU5-5QM9=WgB0uE_YDotU-YNytGqmNSg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=broonie@kernel.org \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=meghana.madhyastha@gmail.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.