* [PATCH 0/2] Naming changes for DMA-BUF Heaps in drm-misc-next
@ 2019-12-16 13:34 Andrew F. Davis
2019-12-16 13:34 ` [PATCH 1/2] dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier Andrew F. Davis
2019-12-16 13:34 ` [PATCH 2/2] dma-buf: heaps: Remove redundant heap identifier from system heap name Andrew F. Davis
0 siblings, 2 replies; 5+ messages in thread
From: Andrew F. Davis @ 2019-12-16 13:34 UTC (permalink / raw)
To: Sumit Semwal, John Stultz; +Cc: dri-devel, Andrew F . Davis
Hello all,
This is a quick series to cleanup some minor naming issues in the new
DMA-BUF Heaps series on next before the names become ABI.
Thanks,
Andrew
Andrew F. Davis (2):
dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier
dma-buf: heaps: Remove redundant heap identifier from system heap name
drivers/dma-buf/dma-heap.c | 4 ++--
drivers/dma-buf/heaps/system_heap.c | 2 +-
include/uapi/linux/dma-heap.h | 4 ++--
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier
2019-12-16 13:34 [PATCH 0/2] Naming changes for DMA-BUF Heaps in drm-misc-next Andrew F. Davis
@ 2019-12-16 13:34 ` Andrew F. Davis
2019-12-16 21:10 ` John Stultz
2019-12-16 13:34 ` [PATCH 2/2] dma-buf: heaps: Remove redundant heap identifier from system heap name Andrew F. Davis
1 sibling, 1 reply; 5+ messages in thread
From: Andrew F. Davis @ 2019-12-16 13:34 UTC (permalink / raw)
To: Sumit Semwal, John Stultz; +Cc: dri-devel, Andrew F . Davis
This is more consistent with the DMA and DRM frameworks convention. This
patch is only a name change, no logic is changed.
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
drivers/dma-buf/dma-heap.c | 4 ++--
include/uapi/linux/dma-heap.h | 4 ++--
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
index 4f04d104ae61..a24721496114 100644
--- a/drivers/dma-buf/dma-heap.c
+++ b/drivers/dma-buf/dma-heap.c
@@ -107,7 +107,7 @@ static long dma_heap_ioctl_allocate(struct file *file, void *data)
}
unsigned int dma_heap_ioctl_cmds[] = {
- DMA_HEAP_IOC_ALLOC,
+ DMA_HEAP_IOCTL_ALLOC,
};
static long dma_heap_ioctl(struct file *file, unsigned int ucmd,
@@ -153,7 +153,7 @@ static long dma_heap_ioctl(struct file *file, unsigned int ucmd,
memset(kdata + in_size, 0, ksize - in_size);
switch (kcmd) {
- case DMA_HEAP_IOC_ALLOC:
+ case DMA_HEAP_IOCTL_ALLOC:
ret = dma_heap_ioctl_allocate(file, kdata);
break;
default:
diff --git a/include/uapi/linux/dma-heap.h b/include/uapi/linux/dma-heap.h
index 73e7f66c1cae..6f84fa08e074 100644
--- a/include/uapi/linux/dma-heap.h
+++ b/include/uapi/linux/dma-heap.h
@@ -42,12 +42,12 @@ struct dma_heap_allocation_data {
#define DMA_HEAP_IOC_MAGIC 'H'
/**
- * DOC: DMA_HEAP_IOC_ALLOC - allocate memory from pool
+ * DOC: DMA_HEAP_IOCTL_ALLOC - allocate memory from pool
*
* Takes a dma_heap_allocation_data struct and returns it with the fd field
* populated with the dmabuf handle of the allocation.
*/
-#define DMA_HEAP_IOC_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\
+#define DMA_HEAP_IOCTL_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\
struct dma_heap_allocation_data)
#endif /* _UAPI_LINUX_DMABUF_POOL_H */
diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
index 3e53ad331bdc..cd5e1f602ac9 100644
--- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
+++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
@@ -116,7 +116,7 @@ static int dmabuf_heap_alloc_fdflags(int fd, size_t len, unsigned int fd_flags,
if (!dmabuf_fd)
return -EINVAL;
- ret = ioctl(fd, DMA_HEAP_IOC_ALLOC, &data);
+ ret = ioctl(fd, DMA_HEAP_IOCTL_ALLOC, &data);
if (ret < 0)
return ret;
*dmabuf_fd = (int)data.fd;
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] dma-buf: heaps: Remove redundant heap identifier from system heap name
2019-12-16 13:34 [PATCH 0/2] Naming changes for DMA-BUF Heaps in drm-misc-next Andrew F. Davis
2019-12-16 13:34 ` [PATCH 1/2] dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier Andrew F. Davis
@ 2019-12-16 13:34 ` Andrew F. Davis
2019-12-16 21:11 ` John Stultz
1 sibling, 1 reply; 5+ messages in thread
From: Andrew F. Davis @ 2019-12-16 13:34 UTC (permalink / raw)
To: Sumit Semwal, John Stultz; +Cc: dri-devel, Andrew F . Davis
The heaps are already in a directory of heaps, adding _heap to a heap
name is redundant. This patch is only a name change, no logic is changed.
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
drivers/dma-buf/heaps/system_heap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c
index 1aa01e98c595..0bf688e3c023 100644
--- a/drivers/dma-buf/heaps/system_heap.c
+++ b/drivers/dma-buf/heaps/system_heap.c
@@ -109,7 +109,7 @@ static int system_heap_create(void)
struct dma_heap_export_info exp_info;
int ret = 0;
- exp_info.name = "system_heap";
+ exp_info.name = "system";
exp_info.ops = &system_heap_ops;
exp_info.priv = NULL;
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier
2019-12-16 13:34 ` [PATCH 1/2] dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier Andrew F. Davis
@ 2019-12-16 21:10 ` John Stultz
0 siblings, 0 replies; 5+ messages in thread
From: John Stultz @ 2019-12-16 21:10 UTC (permalink / raw)
To: Andrew F. Davis; +Cc: dri-devel
On Mon, Dec 16, 2019 at 5:34 AM Andrew F. Davis <afd@ti.com> wrote:
>
> This is more consistent with the DMA and DRM frameworks convention. This
> patch is only a name change, no logic is changed.
>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
Do wish we had caught/made this tweak earlier, but I do agree its a
more consistent name.
Acked-by: John Stultz <john.stultz@linaro.org>
I've also reworked my userland changes to use this name, and will
update them here shortly (assuming there's no objection to this).
Sumit: Mind queuing for drm-misc-next?
thanks
-john
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] dma-buf: heaps: Remove redundant heap identifier from system heap name
2019-12-16 13:34 ` [PATCH 2/2] dma-buf: heaps: Remove redundant heap identifier from system heap name Andrew F. Davis
@ 2019-12-16 21:11 ` John Stultz
0 siblings, 0 replies; 5+ messages in thread
From: John Stultz @ 2019-12-16 21:11 UTC (permalink / raw)
To: Andrew F. Davis; +Cc: dri-devel
On Mon, Dec 16, 2019 at 5:34 AM Andrew F. Davis <afd@ti.com> wrote:
>
> The heaps are already in a directory of heaps, adding _heap to a heap
> name is redundant. This patch is only a name change, no logic is changed.
>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
Again, do wish we had caught/made this tweak earlier, but this seems sane to me.
Acked-by: John Stultz <john.stultz@linaro.org>
I've also reworked my userland changes to use this name, and will
update them here shortly (assuming there's no objection to this).
Sumit: Mind queuing for drm-misc-next?
thanks
-john
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-16 21:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 13:34 [PATCH 0/2] Naming changes for DMA-BUF Heaps in drm-misc-next Andrew F. Davis
2019-12-16 13:34 ` [PATCH 1/2] dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier Andrew F. Davis
2019-12-16 21:10 ` John Stultz
2019-12-16 13:34 ` [PATCH 2/2] dma-buf: heaps: Remove redundant heap identifier from system heap name Andrew F. Davis
2019-12-16 21:11 ` John Stultz
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.