From: Dave Gordon <david.s.gordon@intel.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
Mark Brown <broonie@kernel.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Chen-Yu Tsai <wens@csie.org>,
linux-sunxi@googlegroups.com, Vinod Koul <vinod.koul@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org,
Mauro Carvalho Chehab <m.chehab@samsung.com>,
Hans Verkuil <hans.verkuil@cisco.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
devicetree@vger.kernel.org, Richard Weinberger <richard@nod.at>
Subject: Re: [PATCH v2 4/7] scatterlist: add sg_alloc_table_from_buf() helper
Date: Tue, 5 Apr 2016 08:11:48 +0100 [thread overview]
Message-ID: <57036534.7010800@intel.com> (raw)
In-Reply-To: <20160330201831.38e1d6bd@bbrezillon>
On 30/03/16 19:18, Boris Brezillon wrote:
> On Wed, 30 Mar 2016 09:51:43 -0700
> Mark Brown <broonie@kernel.org> wrote:
>
>> On Wed, Mar 30, 2016 at 05:39:51PM +0200, Boris Brezillon wrote:
>>> sg_alloc_table_from_buf() provides an easy solution to create an sg_table
>>> from a virtual address pointer. This function takes care of dealing with
>>> vmallocated buffers, buffer alignment, or DMA engine limitations (maximum
>>> DMA transfer size).
>>
>> This seems nice. Should we also have a further helper on top of this
>> which will get constraints from a dmaengine, it seems like it'd be a
>> common need?
>
> Yep, we could create a wrapper extracting dma_slave caps info,
> converting it to sg_constraints and calling sg_alloc_table_from_buf().
> But let's try to get this function accepted first, and I'll send another
> patch providing this wrapper.
>
> BTW, do you see other things that should be added in sg_constraints?
>
You could compare with the things Solaris uses to describe the
restrictions on a DMA binding ...
http://docs.oracle.com/cd/E23824_01/html/821-1478/ddi-dma-attr-9s.html#REFMAN9Sddi-dma-attr-9s
.Dave.
WARNING: multiple messages have this Message-ID (diff)
From: Dave Gordon <david.s.gordon-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Boris Brezillon
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Brian Norris
<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Dan Williams
<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mauro Carvalho Chehab
<m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Hans Verkuil
<hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>
Subject: Re: [PATCH v2 4/7] scatterlist: add sg_alloc_table_from_buf() helper
Date: Tue, 5 Apr 2016 08:11:48 +0100 [thread overview]
Message-ID: <57036534.7010800@intel.com> (raw)
In-Reply-To: <20160330201831.38e1d6bd@bbrezillon>
On 30/03/16 19:18, Boris Brezillon wrote:
> On Wed, 30 Mar 2016 09:51:43 -0700
> Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>
>> On Wed, Mar 30, 2016 at 05:39:51PM +0200, Boris Brezillon wrote:
>>> sg_alloc_table_from_buf() provides an easy solution to create an sg_table
>>> from a virtual address pointer. This function takes care of dealing with
>>> vmallocated buffers, buffer alignment, or DMA engine limitations (maximum
>>> DMA transfer size).
>>
>> This seems nice. Should we also have a further helper on top of this
>> which will get constraints from a dmaengine, it seems like it'd be a
>> common need?
>
> Yep, we could create a wrapper extracting dma_slave caps info,
> converting it to sg_constraints and calling sg_alloc_table_from_buf().
> But let's try to get this function accepted first, and I'll send another
> patch providing this wrapper.
>
> BTW, do you see other things that should be added in sg_constraints?
>
You could compare with the things Solaris uses to describe the
restrictions on a DMA binding ...
http://docs.oracle.com/cd/E23824_01/html/821-1478/ddi-dma-attr-9s.html#REFMAN9Sddi-dma-attr-9s
.Dave.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: david.s.gordon@intel.com (Dave Gordon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/7] scatterlist: add sg_alloc_table_from_buf() helper
Date: Tue, 5 Apr 2016 08:11:48 +0100 [thread overview]
Message-ID: <57036534.7010800@intel.com> (raw)
In-Reply-To: <20160330201831.38e1d6bd@bbrezillon>
On 30/03/16 19:18, Boris Brezillon wrote:
> On Wed, 30 Mar 2016 09:51:43 -0700
> Mark Brown <broonie@kernel.org> wrote:
>
>> On Wed, Mar 30, 2016 at 05:39:51PM +0200, Boris Brezillon wrote:
>>> sg_alloc_table_from_buf() provides an easy solution to create an sg_table
>>> from a virtual address pointer. This function takes care of dealing with
>>> vmallocated buffers, buffer alignment, or DMA engine limitations (maximum
>>> DMA transfer size).
>>
>> This seems nice. Should we also have a further helper on top of this
>> which will get constraints from a dmaengine, it seems like it'd be a
>> common need?
>
> Yep, we could create a wrapper extracting dma_slave caps info,
> converting it to sg_constraints and calling sg_alloc_table_from_buf().
> But let's try to get this function accepted first, and I'll send another
> patch providing this wrapper.
>
> BTW, do you see other things that should be added in sg_constraints?
>
You could compare with the things Solaris uses to describe the
restrictions on a DMA binding ...
http://docs.oracle.com/cd/E23824_01/html/821-1478/ddi-dma-attr-9s.html#REFMAN9Sddi-dma-attr-9s
.Dave.
next prev parent reply other threads:[~2016-04-05 7:11 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 15:39 [PATCH v2 0/7] mtd: nand: sunxi: add support for DMA operations Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` [PATCH v2 1/7] mtd: nand: sunxi: move some ECC related operations to their own functions Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` [PATCH v2 2/7] mtd: nand: sunxi: make OOB retrieval optional Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` [PATCH v2 3/7] mtd: nand: sunxi: make cur_off parameter optional in extra oob helpers Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` [PATCH v2 4/7] scatterlist: add sg_alloc_table_from_buf() helper Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 16:51 ` Mark Brown
2016-03-30 16:51 ` Mark Brown
2016-03-30 16:51 ` Mark Brown
2016-03-30 16:51 ` Mark Brown
2016-03-30 18:18 ` Boris Brezillon
2016-03-30 18:18 ` Boris Brezillon
2016-03-30 18:18 ` Boris Brezillon
2016-03-30 18:18 ` Boris Brezillon
2016-03-30 18:34 ` Mark Brown
2016-03-30 18:34 ` Mark Brown
2016-03-30 18:34 ` Mark Brown
2016-03-30 18:34 ` Mark Brown
2016-04-05 7:11 ` Dave Gordon [this message]
2016-04-05 7:11 ` Dave Gordon
2016-04-05 7:11 ` Dave Gordon
2016-03-31 4:56 ` [v2,4/7] " Vignesh R
2016-03-31 4:56 ` Vignesh R
2016-03-31 4:56 ` Vignesh R
2016-03-31 7:26 ` Boris Brezillon
2016-03-31 7:26 ` Boris Brezillon
2016-03-31 7:26 ` Boris Brezillon
2016-03-31 7:26 ` Boris Brezillon
2016-03-30 15:39 ` [PATCH v2 5/7] mtd: provide helper to prepare buffers for DMA operations Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` [PATCH v2 6/7] mtd: nand: sunxi: add support for DMA assisted operations Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` [PATCH v2 7/7] mtd: nand: sunxi: update DT bindings Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
2016-03-30 15:39 ` Boris Brezillon
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=57036534.7010800@intel.com \
--to=david.s.gordon@intel.com \
--cc=akpm@linux-foundation.org \
--cc=boris.brezillon@free-electrons.com \
--cc=broonie@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=galak@codeaurora.org \
--cc=hans.verkuil@cisco.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=m.chehab@samsung.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=pawel.moll@arm.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=vinod.koul@intel.com \
--cc=wens@csie.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.