* [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions
@ 2014-05-13 23:49 Gioh Kim
2014-05-20 23:20 ` Bjorn Helgaas
0 siblings, 1 reply; 7+ messages in thread
From: Gioh Kim @ 2014-05-13 23:49 UTC (permalink / raw)
To: Sumit Semwal, Randy Dunlap, linux-media, dri-devel, linux-doc,
linux-kernel
Cc: gunho.lee, Gioh Kim
Update some descriptions for API arguments and descriptions.
Signed-off-by: Gioh Kim <gioh.kim@lge.com>
---
Documentation/dma-buf-sharing.txt | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index 505e711..aadd901 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -56,10 +56,10 @@ The dma_buf buffer sharing API usage contains the following steps:
size_t size, int flags,
const char *exp_name)
- If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a
- pointer to the same. It also associates an anonymous file with this buffer,
- so it can be exported. On failure to allocate the dma_buf object, it returns
- NULL.
+ If this succeeds, dma_buf_export_named allocates a dma_buf structure, and
+ returns a pointer to the same. It also associates an anonymous file with this
+ buffer, so it can be exported. On failure to allocate the dma_buf object,
+ it returns NULL.
'exp_name' is the name of exporter - to facilitate information while
debugging.
@@ -76,7 +76,7 @@ The dma_buf buffer sharing API usage contains the following steps:
drivers and/or processes.
Interface:
- int dma_buf_fd(struct dma_buf *dmabuf)
+ int dma_buf_fd(struct dma_buf *dmabuf, int flags)
This API installs an fd for the anonymous file associated with this buffer;
returns either 'fd', or error.
@@ -157,7 +157,9 @@ to request use of buffer for allocation.
"dma_buf->ops->" indirection from the users of this interface.
In struct dma_buf_ops, unmap_dma_buf is defined as
- void (*unmap_dma_buf)(struct dma_buf_attachment *, struct sg_table *);
+ void (*unmap_dma_buf)(struct dma_buf_attachment *,
+ struct sg_table *,
+ enum dma_data_direction);
unmap_dma_buf signifies the end-of-DMA for the attachment provided. Like
map_dma_buf, this API also must be implemented by the exporter.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions
2014-05-13 23:49 [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions Gioh Kim
@ 2014-05-20 23:20 ` Bjorn Helgaas
2014-05-21 3:43 ` Sumit Semwal
0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2014-05-20 23:20 UTC (permalink / raw)
To: Gioh Kim
Cc: Sumit Semwal, Randy Dunlap, linux-media, dri-devel, linux-doc,
linux-kernel, gunho.lee
On Wed, May 14, 2014 at 08:49:43AM +0900, Gioh Kim wrote:
> Update some descriptions for API arguments and descriptions.
>
> Signed-off-by: Gioh Kim <gioh.kim@lge.com>
I applied this to my "dma-api" branch for v3.16, thanks!
> ---
> Documentation/dma-buf-sharing.txt | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
> index 505e711..aadd901 100644
> --- a/Documentation/dma-buf-sharing.txt
> +++ b/Documentation/dma-buf-sharing.txt
> @@ -56,10 +56,10 @@ The dma_buf buffer sharing API usage contains the following steps:
> size_t size, int flags,
> const char *exp_name)
>
> - If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a
> - pointer to the same. It also associates an anonymous file with this buffer,
> - so it can be exported. On failure to allocate the dma_buf object, it returns
> - NULL.
> + If this succeeds, dma_buf_export_named allocates a dma_buf structure, and
> + returns a pointer to the same. It also associates an anonymous file with this
> + buffer, so it can be exported. On failure to allocate the dma_buf object,
> + it returns NULL.
>
> 'exp_name' is the name of exporter - to facilitate information while
> debugging.
> @@ -76,7 +76,7 @@ The dma_buf buffer sharing API usage contains the following steps:
> drivers and/or processes.
>
> Interface:
> - int dma_buf_fd(struct dma_buf *dmabuf)
> + int dma_buf_fd(struct dma_buf *dmabuf, int flags)
>
> This API installs an fd for the anonymous file associated with this buffer;
> returns either 'fd', or error.
> @@ -157,7 +157,9 @@ to request use of buffer for allocation.
> "dma_buf->ops->" indirection from the users of this interface.
>
> In struct dma_buf_ops, unmap_dma_buf is defined as
> - void (*unmap_dma_buf)(struct dma_buf_attachment *, struct sg_table *);
> + void (*unmap_dma_buf)(struct dma_buf_attachment *,
> + struct sg_table *,
> + enum dma_data_direction);
>
> unmap_dma_buf signifies the end-of-DMA for the attachment provided. Like
> map_dma_buf, this API also must be implemented by the exporter.
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions
2014-05-20 23:20 ` Bjorn Helgaas
@ 2014-05-21 3:43 ` Sumit Semwal
2014-05-21 4:39 ` Bjorn Helgaas
0 siblings, 1 reply; 7+ messages in thread
From: Sumit Semwal @ 2014-05-21 3:43 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Gioh Kim, Randy Dunlap, linux-media, DRI mailing list, linux-doc,
LKML, 이건호
Hi Bjorn,
On 21 May 2014 04:50, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Wed, May 14, 2014 at 08:49:43AM +0900, Gioh Kim wrote:
>> Update some descriptions for API arguments and descriptions.
>>
>> Signed-off-by: Gioh Kim <gioh.kim@lge.com>
>
> I applied this to my "dma-api" branch for v3.16, thanks!
As always, I would queue this up for my dma-buf pull request, along
with other dma-buf changes.
Thanks and best regards,
~Sumit.
>
>> ---
>> Documentation/dma-buf-sharing.txt | 14 ++++++++------
>> 1 file changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
>> index 505e711..aadd901 100644
>> --- a/Documentation/dma-buf-sharing.txt
>> +++ b/Documentation/dma-buf-sharing.txt
>> @@ -56,10 +56,10 @@ The dma_buf buffer sharing API usage contains the following steps:
>> size_t size, int flags,
>> const char *exp_name)
>>
>> - If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a
>> - pointer to the same. It also associates an anonymous file with this buffer,
>> - so it can be exported. On failure to allocate the dma_buf object, it returns
>> - NULL.
>> + If this succeeds, dma_buf_export_named allocates a dma_buf structure, and
>> + returns a pointer to the same. It also associates an anonymous file with this
>> + buffer, so it can be exported. On failure to allocate the dma_buf object,
>> + it returns NULL.
>>
>> 'exp_name' is the name of exporter - to facilitate information while
>> debugging.
>> @@ -76,7 +76,7 @@ The dma_buf buffer sharing API usage contains the following steps:
>> drivers and/or processes.
>>
>> Interface:
>> - int dma_buf_fd(struct dma_buf *dmabuf)
>> + int dma_buf_fd(struct dma_buf *dmabuf, int flags)
>>
>> This API installs an fd for the anonymous file associated with this buffer;
>> returns either 'fd', or error.
>> @@ -157,7 +157,9 @@ to request use of buffer for allocation.
>> "dma_buf->ops->" indirection from the users of this interface.
>>
>> In struct dma_buf_ops, unmap_dma_buf is defined as
>> - void (*unmap_dma_buf)(struct dma_buf_attachment *, struct sg_table *);
>> + void (*unmap_dma_buf)(struct dma_buf_attachment *,
>> + struct sg_table *,
>> + enum dma_data_direction);
>>
>> unmap_dma_buf signifies the end-of-DMA for the attachment provided. Like
>> map_dma_buf, this API also must be implemented by the exporter.
>> --
>> 1.7.9.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
--
Thanks and regards,
Sumit Semwal
Graphics Engineer - Graphics working group
Linaro.org │ Open source software for ARM SoCs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions
2014-05-21 3:43 ` Sumit Semwal
@ 2014-05-21 4:39 ` Bjorn Helgaas
0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2014-05-21 4:39 UTC (permalink / raw)
To: Sumit Semwal
Cc: Gioh Kim, Randy Dunlap, linux-media, DRI mailing list,
linux-doc@vger.kernel.org, LKML, 이건호
On Tue, May 20, 2014 at 9:43 PM, Sumit Semwal <sumit.semwal@linaro.org> wrote:
> Hi Bjorn,
>
> On 21 May 2014 04:50, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Wed, May 14, 2014 at 08:49:43AM +0900, Gioh Kim wrote:
>>> Update some descriptions for API arguments and descriptions.
>>>
>>> Signed-off-by: Gioh Kim <gioh.kim@lge.com>
>>
>> I applied this to my "dma-api" branch for v3.16, thanks!
> As always, I would queue this up for my dma-buf pull request, along
> with other dma-buf changes.
OK, I dropped this one.
>>> ---
>>> Documentation/dma-buf-sharing.txt | 14 ++++++++------
>>> 1 file changed, 8 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
>>> index 505e711..aadd901 100644
>>> --- a/Documentation/dma-buf-sharing.txt
>>> +++ b/Documentation/dma-buf-sharing.txt
>>> @@ -56,10 +56,10 @@ The dma_buf buffer sharing API usage contains the following steps:
>>> size_t size, int flags,
>>> const char *exp_name)
>>>
>>> - If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a
>>> - pointer to the same. It also associates an anonymous file with this buffer,
>>> - so it can be exported. On failure to allocate the dma_buf object, it returns
>>> - NULL.
>>> + If this succeeds, dma_buf_export_named allocates a dma_buf structure, and
>>> + returns a pointer to the same. It also associates an anonymous file with this
>>> + buffer, so it can be exported. On failure to allocate the dma_buf object,
>>> + it returns NULL.
>>>
>>> 'exp_name' is the name of exporter - to facilitate information while
>>> debugging.
>>> @@ -76,7 +76,7 @@ The dma_buf buffer sharing API usage contains the following steps:
>>> drivers and/or processes.
>>>
>>> Interface:
>>> - int dma_buf_fd(struct dma_buf *dmabuf)
>>> + int dma_buf_fd(struct dma_buf *dmabuf, int flags)
>>>
>>> This API installs an fd for the anonymous file associated with this buffer;
>>> returns either 'fd', or error.
>>> @@ -157,7 +157,9 @@ to request use of buffer for allocation.
>>> "dma_buf->ops->" indirection from the users of this interface.
>>>
>>> In struct dma_buf_ops, unmap_dma_buf is defined as
>>> - void (*unmap_dma_buf)(struct dma_buf_attachment *, struct sg_table *);
>>> + void (*unmap_dma_buf)(struct dma_buf_attachment *,
>>> + struct sg_table *,
>>> + enum dma_data_direction);
>>>
>>> unmap_dma_buf signifies the end-of-DMA for the attachment provided. Like
>>> map_dma_buf, this API also must be implemented by the exporter.
>>> --
>>> 1.7.9.5
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>> Please read the FAQ at http://www.tux.org/lkml/
>
>
>
> --
> Thanks and regards,
>
> Sumit Semwal
> Graphics Engineer - Graphics working group
> Linaro.org │ Open source software for ARM SoCs
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions
@ 2014-05-12 11:48 gioh.kim
2014-05-13 8:44 ` Thierry Reding
0 siblings, 1 reply; 7+ messages in thread
From: gioh.kim @ 2014-05-12 11:48 UTC (permalink / raw)
To: Sumit Semwal, Randy Dunlap, linux-media, dri-devel, linux-doc,
linux-kernel
Cc: gunho.lee, gioh.kim
From: "gioh.kim" <gioh.kim@lge.com>
update some descriptions for API arguments and descriptions.
Signed-off-by: Gioh Kim <gioh.kim@lge.com>
---
Documentation/dma-buf-sharing.txt | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index 505e711..1ea89b8 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -56,7 +56,7 @@ The dma_buf buffer sharing API usage contains the following steps:
size_t size, int flags,
const char *exp_name)
- If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a
+ If this succeeds, dma_buf_export_named allocates a dma_buf structure, and returns a
pointer to the same. It also associates an anonymous file with this buffer,
so it can be exported. On failure to allocate the dma_buf object, it returns
NULL.
@@ -66,7 +66,7 @@ The dma_buf buffer sharing API usage contains the following steps:
Exporting modules which do not wish to provide any specific name may use the
helper define 'dma_buf_export()', with the same arguments as above, but
- without the last argument; a __FILE__ pre-processor directive will be
+ without the last argument; a KBUILD_MODNAME pre-processor directive will be
inserted in place of 'exp_name' instead.
2. Userspace gets a handle to pass around to potential buffer-users
@@ -76,7 +76,7 @@ The dma_buf buffer sharing API usage contains the following steps:
drivers and/or processes.
Interface:
- int dma_buf_fd(struct dma_buf *dmabuf)
+ int dma_buf_fd(struct dma_buf *dmabuf, int flags)
This API installs an fd for the anonymous file associated with this buffer;
returns either 'fd', or error.
@@ -157,7 +157,9 @@ to request use of buffer for allocation.
"dma_buf->ops->" indirection from the users of this interface.
In struct dma_buf_ops, unmap_dma_buf is defined as
- void (*unmap_dma_buf)(struct dma_buf_attachment *, struct sg_table *);
+ void (*unmap_dma_buf)(struct dma_buf_attachment *,
+ struct sg_table *,
+ enum dma_data_direction);
unmap_dma_buf signifies the end-of-DMA for the attachment provided. Like
map_dma_buf, this API also must be implemented by the exporter.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions
2014-05-12 11:48 gioh.kim
@ 2014-05-13 8:44 ` Thierry Reding
2014-05-13 23:53 ` Gioh Kim
0 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2014-05-13 8:44 UTC (permalink / raw)
To: gioh.kim
Cc: Sumit Semwal, Randy Dunlap, linux-media, dri-devel, linux-doc,
linux-kernel, gunho.lee
[-- Attachment #1: Type: text/plain, Size: 1988 bytes --]
On Mon, May 12, 2014 at 08:48:12PM +0900, gioh.kim wrote:
> From: "gioh.kim" <gioh.kim@lge.com>
It might be good to fix your setup to make this be the same as the name
and email used in the Signed-off-by line below.
> update some descriptions for API arguments and descriptions.
Nit: "Update" since it's the beginning of a sentence.
> Signed-off-by: Gioh Kim <gioh.kim@lge.com>
> ---
> Documentation/dma-buf-sharing.txt | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
> index 505e711..1ea89b8 100644
> --- a/Documentation/dma-buf-sharing.txt
> +++ b/Documentation/dma-buf-sharing.txt
> @@ -56,7 +56,7 @@ The dma_buf buffer sharing API usage contains the following steps:
> size_t size, int flags,
> const char *exp_name)
>
> - If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a
> + If this succeeds, dma_buf_export_named allocates a dma_buf structure, and returns a
Perhaps reformat this so that the lines don't exceed 80 characters?
> pointer to the same. It also associates an anonymous file with this buffer,
> so it can be exported. On failure to allocate the dma_buf object, it returns
> NULL.
> @@ -66,7 +66,7 @@ The dma_buf buffer sharing API usage contains the following steps:
>
> Exporting modules which do not wish to provide any specific name may use the
> helper define 'dma_buf_export()', with the same arguments as above, but
> - without the last argument; a __FILE__ pre-processor directive will be
> + without the last argument; a KBUILD_MODNAME pre-processor directive will be
> inserted in place of 'exp_name' instead.
This was already fixed in commit 2e33def0339c (dma-buf: update exp_name
when using dma_buf_export()). Perhaps you should rebase this patch on
top of the latest linux-next.
Otherwise looks good.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions
2014-05-13 8:44 ` Thierry Reding
@ 2014-05-13 23:53 ` Gioh Kim
0 siblings, 0 replies; 7+ messages in thread
From: Gioh Kim @ 2014-05-13 23:53 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: 'Sumit Semwal', 'Randy Dunlap', linux-media,
dri-devel, linux-doc, linux-kernel, gunho.lee
Thank you for advice.
I will send a fixed patch soon.
> -----Original Message-----
> From: Thierry Reding [mailto:thierry.reding@gmail.com]
> Sent: Tuesday, May 13, 2014 5:45 PM
> To: gioh.kim
> Cc: Sumit Semwal; Randy Dunlap; linux-media@vger.kernel.org; dri-devel@lists.freedesktop.org; linux-
> doc@vger.kernel.org; linux-kernel@vger.kernel.org; gunho.lee@lge.com
> Subject: Re: [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions
>
> On Mon, May 12, 2014 at 08:48:12PM +0900, gioh.kim wrote:
> > From: "gioh.kim" <gioh.kim@lge.com>
>
> It might be good to fix your setup to make this be the same as the name
> and email used in the Signed-off-by line below.
>
> > update some descriptions for API arguments and descriptions.
>
> Nit: "Update" since it's the beginning of a sentence.
>
> > Signed-off-by: Gioh Kim <gioh.kim@lge.com>
> > ---
> > Documentation/dma-buf-sharing.txt | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
> > index 505e711..1ea89b8 100644
> > --- a/Documentation/dma-buf-sharing.txt
> > +++ b/Documentation/dma-buf-sharing.txt
> > @@ -56,7 +56,7 @@ The dma_buf buffer sharing API usage contains the following steps:
> > size_t size, int flags,
> > const char *exp_name)
> >
> > - If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a
> > + If this succeeds, dma_buf_export_named allocates a dma_buf structure, and returns a
>
> Perhaps reformat this so that the lines don't exceed 80 characters?
>
> > pointer to the same. It also associates an anonymous file with this buffer,
> > so it can be exported. On failure to allocate the dma_buf object, it returns
> > NULL.
> > @@ -66,7 +66,7 @@ The dma_buf buffer sharing API usage contains the following steps:
> >
> > Exporting modules which do not wish to provide any specific name may use the
> > helper define 'dma_buf_export()', with the same arguments as above, but
> > - without the last argument; a __FILE__ pre-processor directive will be
> > + without the last argument; a KBUILD_MODNAME pre-processor directive will be
> > inserted in place of 'exp_name' instead.
>
> This was already fixed in commit 2e33def0339c (dma-buf: update exp_name
> when using dma_buf_export()). Perhaps you should rebase this patch on
> top of the latest linux-next.
>
> Otherwise looks good.
>
> Thierry
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-21 4:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 23:49 [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions Gioh Kim
2014-05-20 23:20 ` Bjorn Helgaas
2014-05-21 3:43 ` Sumit Semwal
2014-05-21 4:39 ` Bjorn Helgaas
-- strict thread matches above, loose matches on Subject: below --
2014-05-12 11:48 gioh.kim
2014-05-13 8:44 ` Thierry Reding
2014-05-13 23:53 ` Gioh Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox