All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC 4/5] dmaengine: rcar-dmac: Implement support for hardware descriptor lists
Date: Mon, 04 Aug 2014 12:28:01 +0000	[thread overview]
Message-ID: <CAMuHMdVg1D4oWpPbDBpkWAktDYU7zkR7fkjFT7guxUy8U5u=FQ@mail.gmail.com> (raw)

On Tue, Jul 22, 2014 at 2:33 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> @@ -740,6 +862,14 @@ rcar_dmac_chan_prep_sg(struct rcar_dmac_chan *chan, struct scatterlist *sgl,
>                                 size = ALIGN(dev_addr, 1ULL << 32) - dev_addr;
>                         if (mem_addr >> 32 != (mem_addr + size - 1) >> 32)
>                                 size = ALIGN(mem_addr, 1ULL << 32) - mem_addr;
> +
> +                       /*
> +                        * Check if either of the source or destination address
> +                        * can't be expressed on 32 bits. If so we can't use

s/on/in/

> +                        * hardware descriptors lists.

s/descriptors/descriptor/

> +                        */
> +                       if (dev_addr >> 32 || mem_addr >> 32)
> +                               highmem = true;
>  #endif
>
>                         chunk = rcar_dmac_xfer_chunk_get(chan);
> @@ -770,11 +900,26 @@ rcar_dmac_chan_prep_sg(struct rcar_dmac_chan *chan, struct scatterlist *sgl,
>                         len -= size;
>
>                         list_add_tail(&chunk->node, &desc->chunks);
> +                       nchunks++;
>                 }
>         }
>
> +       desc->nchunks = nchunks;
>         desc->size = full_size;
>
> +       /*
> +        * Use hardware descriptor lists if possible when more than one chunk
> +        * needs to be transferred (otherwise they don't make much sense).
> +        *
> +        * The highmem check currently covers the whole transfer. As an
> +        * optimization we could use descriptor lists for consecutive lowmem
> +        * chunks and direct manual mode for highmem chunks. Whether the
> +        * performance improvement would be significant enough compared to the
> +        * additional complexity remains to be studied.

s/studied/investigated/

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

             reply	other threads:[~2014-08-04 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 12:28 Geert Uytterhoeven [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-07-22 12:33 [PATCH/RFC 4/5] dmaengine: rcar-dmac: Implement support for hardware descriptor lists Laurent Pinchart

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='CAMuHMdVg1D4oWpPbDBpkWAktDYU7zkR7fkjFT7guxUy8U5u=FQ@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=linux-sh@vger.kernel.org \
    /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.