This test creates a udmabuf, and a dmabuf from the system dmabuf heap,
and uses a BPF program that prints dmabuf metadata with the new
dmabuf_iter to verify they can be found.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
Acked-by: Song Liu
---
tools/testing/selftests/bpf/config
Use the same test buffers as the traditional iterator and a new BPF map
to verify the test buffers can be found with the open coded dmabuf
iterator.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
Acked-by: Song Liu
---
.../testing/selftests/bpf/bpf_experimental.h | 5
Rename the debugfs list and mutex so it's clear they are now usable
without the need for CONFIG_DEBUG_FS. The list will always be populated
to support the creation of a BPF iterator for dmabufs.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
Acked-by: Song Liu
---
drivers/dm
data compared to multiple reads from procfs, sysfs, or
multiple traditional BPF iterator invocations.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
Acked-by: Song Liu
---
kernel/bpf/dmabuf_iter.c | 48
kernel/bpf/helpers.c | 5 +
2 files
eorder sanitize_string bounds checks per Song Liu
Add Song's Ack to: selftests/bpf: Add test for dmabuf_iter
Rebase onto bpf-next/master per BPF CI
T.J. Mercier (5):
dma-buf: Rename debugfs symbols
bpf: Add dmabuf iterator
bpf: Add open coded dmabuf iterator
selftests/bpf: Add tes
.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
Acked-by: Song Liu
---
drivers/dma-buf/dma-buf.c | 68 +
include/linux/dma-buf.h | 2 +
kernel/bpf/Makefile | 3 ++
kernel/bpf/dmabuf_iter.c | 102 ++
4 files changed
On Mon, May 19, 2025 at 9:06 PM wangtao wrote:
>
>
>
> > -Original Message-
> > From: wangtao
> > Sent: Monday, May 19, 2025 8:04 PM
> > To: 'T.J. Mercier' ; Christian König
> >
> > Cc: sumit.sem...@linaro.org; benjamin.
On Fri, May 16, 2025 at 1:36 AM Christian König
wrote:
>
> On 5/16/25 09:40, wangtao wrote:
> >
> >
> >> -Original Message-
> >> From: Christian König
> >> Sent: Thursday, May 15, 2025 10:26 PM
> >> To: wangtao ; sumit.sem...@linaro.org;
> >> benjamin.gaign...@collabora.com; brian.star...
On Wed, May 14, 2025 at 2:00 PM Song Liu wrote:
>
> On Tue, May 13, 2025 at 9:36 AM T.J. Mercier wrote:
> >
> > Use the same test buffers as the traditional iterator and a new BPF map
> > to verify the test buffers can be found with the open coded dmabuf
> > iterat
On Wed, May 14, 2025 at 1:53 PM Song Liu wrote:
>
> On Tue, May 13, 2025 at 9:36 AM T.J. Mercier wrote:
> >
> > This test creates a udmabuf, and a dmabuf from the system dmabuf heap,
> > and uses a BPF program that prints dmabuf metadata with the new
> > dmabuf_it
Rename the debugfs list and mutex so it's clear they are now usable
without the need for CONFIG_DEBUG_FS. The list will always be populated
to support the creation of a BPF iterator for dmabufs.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
Acked-by: Song Liu
---
drivers/dm
data compared to multiple reads from procfs, sysfs, or
multiple traditional BPF iterator invocations.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
Acked-by: Song Liu
---
kernel/bpf/dmabuf_iter.c | 48
kernel/bpf/helpers.c | 5 +
2 files
This test creates a udmabuf, and a dmabuf from the system dmabuf heap,
and uses a BPF program that prints dmabuf metadata with the new
dmabuf_iter to verify they can be found.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
---
tools/testing/selftests/bpf/config| 3
.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
Acked-by: Song Liu
---
drivers/dma-buf/dma-buf.c | 68 +
include/linux/dma-buf.h | 2 +
kernel/bpf/Makefile | 3 ++
kernel/bpf/dmabuf_iter.c | 102 ++
4 files changed
Use the same test buffers as the traditional iterator and a new BPF map
to verify the test buffers can be found with the open coded dmabuf
iterator.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
Acked-by: Song Liu
---
.../testing/selftests/bpf/bpf_experimental.h | 5
Move map insertion from create_test_buffers() to test_dmabuf_iter()
Add ACK to selftests/bpf: Add test for open coded dmabuf_iter
T.J. Mercier (5):
dma-buf: Rename debugfs symbols
bpf: Add dmabuf iterator
bpf: Add open coded dmabuf iterator
selftests/bpf: Add test for dmabuf_iter
selftests/bpf:
On Tue, May 13, 2025 at 4:31 AM Christian König
wrote:
>
> On 5/13/25 11:27, wangtao wrote:
> > Add DMA_BUF_IOCTL_RW_FILE to save/restore data from/to a dma-buf.
>
> Similar approach where rejected before in favor of using udmabuf.
>
> Is there any reason you can't use that approach as well?
I al
On Mon, May 12, 2025 at 1:30 PM Song Liu wrote:
>
> On Mon, May 12, 2025 at 10:41 AM T.J. Mercier wrote:
> >
> > Use the same test buffers as the traditional iterator and a new BPF map
> > to verify the test buffers can be found with the open coded dmabuf
> > iterat
On Mon, May 12, 2025 at 11:58 AM Song Liu wrote:
>
> On Mon, May 12, 2025 at 10:41 AM T.J. Mercier wrote:
> [...]
> > +
> > +static int udmabuf;
>
> static int udmabuf = -1;
>
> > +static const char udmabuf_test_buffer_name[DMA_BUF_NAME_LEN] =
> > &
Use the same test buffers as the traditional iterator and a new BPF map
to verify the test buffers can be found with the open coded dmabuf
iterator.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
---
.../testing/selftests/bpf/bpf_experimental.h | 5 +++
.../selftests/bpf/prog_tests
This test creates a udmabuf, and a dmabuf from the system dmabuf heap,
and uses a BPF program that prints dmabuf metadata with the new
dmabuf_iter to verify they can be found.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
---
tools/testing/selftests/bpf/config| 3
data compared to multiple reads from procfs, sysfs, or
multiple traditional BPF iterator invocations.
Signed-off-by: T.J. Mercier
Acked-by: Christian König
Acked-by: Song Liu
---
kernel/bpf/dmabuf_iter.c | 48
kernel/bpf/helpers.c | 5 +
2 files
Rename the debugfs list and mutex so it's clear they are now usable
without the need for CONFIG_DEBUG_FS. The list will always be populated
to support the creation of a BPF iterator for dmabufs.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
Acked-by: Song Liu
---
drivers/dm
.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
Acked-by: Song Liu
---
drivers/dma-buf/dma-buf.c | 68 +
include/linux/dma-buf.h | 2 +
kernel/bpf/Makefile | 3 ++
kernel/bpf/dmabuf_iter.c | 102 ++
4 files changed
ong Liu's Acks
Move BTF_ID_LIST_SINGLE and DEFINE_BPF_ITER_FUNC closer to usage per
Song Liu
Fix open-coded iterator comment style per Song Liu
Move iterator termination check to its own subtest per Song Liu
Rework selftest buffer creation per Song Liu
Fix spacing in sanitize_string per BPF
On Fri, May 9, 2025 at 2:58 PM Song Liu wrote:
>
> On Fri, May 9, 2025 at 2:43 PM T.J. Mercier wrote:
> >
> [...]
> > >
> > > Personally, I would prefer we just merge all the logic of
> > > create_udmabuf() and create_sys_heap_dmabuf()
> > >
On Fri, May 9, 2025 at 11:46 AM Song Liu wrote:
>
> On Thu, May 8, 2025 at 11:21 AM T.J. Mercier wrote:
> >
> > Use the same test buffers as the traditional iterator and a new BPF map
> > to verify the test buffers can be found with the open coded dmabuf
> > iter
On Thu, May 8, 2025 at 5:36 PM Song Liu wrote:
>
> On Thu, May 8, 2025 at 11:20 AM T.J. Mercier wrote:
> [...]
> > diff --git a/tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c
> > b/tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c
> > new file mode 10
On Thu, May 8, 2025 at 5:28 PM Song Liu wrote:
>
> On Thu, May 8, 2025 at 11:20 AM T.J. Mercier wrote:
> >
> > This open coded iterator allows for more flexibility when creating BPF
> > programs. It can support output in formats other than text. With an open
> >
On Thu, May 8, 2025 at 5:27 PM Song Liu wrote:
>
> On Thu, May 8, 2025 at 11:20 AM T.J. Mercier wrote:
> >
> > The dmabuf iterator traverses the list of all DMA buffers.
> >
> > DMA buffers are refcounted through their associated struct file. A
> > reference
sc-next though, so I'll resend that as a standalone
patch whenever I hear about the next longterm stable release.
>
> Regards,
> Christian.
>
> On 5/8/25 20:20, T.J. Mercier wrote:
> > Until CONFIG_DMABUF_SYSFS_STATS was added [1] it was only possible to
> > perform p
Use the same test buffers as the traditional iterator and a new BPF map
to verify the test buffers can be found with the open coded dmabuf
iterator.
Signed-off-by: T.J. Mercier
---
.../testing/selftests/bpf/bpf_experimental.h | 5 ++
.../selftests/bpf/prog_tests/dmabuf_iter.c| 52
Rename the debugfs list and mutex so it's clear they are now usable
without the need for CONFIG_DEBUG_FS. The list will always be populated
to support the creation of a BPF iterator for dmabufs.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
---
drivers/dma-buf/dma-buf.c
This test creates a udmabuf, and a dmabuf from the system dmabuf heap,
and uses a BPF program that prints dmabuf metadata with the new
dmabuf_iter to verify they can be found.
Signed-off-by: T.J. Mercier
---
tools/testing/selftests/bpf/config| 3 +
.../selftests/bpf/prog_tests
data compared to multiple reads from procfs, sysfs, or
multiple traditional BPF iterator invocations.
Signed-off-by: T.J. Mercier
---
kernel/bpf/dmabuf_iter.c | 47
kernel/bpf/helpers.c | 5 +
2 files changed, 52 insertions(+)
diff --git a/kernel
.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
---
drivers/dma-buf/dma-buf.c | 68 +
include/linux/dma-buf.h | 2 +
kernel/bpf/Makefile | 3 ++
kernel/bpf/dmabuf_iter.c | 102 ++
4 files changed, 175 insertions
oitov
Rename get_first_dmabuf / get_next_dmabuf to dma_buf_iter_begin /
dma_buf_iter_next per Christian König
Add Christian's RB to bpf: Add dmabuf iterator
T.J. Mercier (5):
dma-buf: Rename debugfs symbols
bpf: Add dmabuf iterator
bpf: Add open coded dmabuf iterator
selftests/bpf: Add test fo
On Wed, May 7, 2025 at 7:14 AM Alexei Starovoitov
wrote:
>
> On Tue, May 6, 2025 at 5:10 PM T.J. Mercier wrote:
> >
> > +/**
> > + * get_first_dmabuf - begin iteration through global list of DMA-bufs
> > + *
> > + * Returns the first buffer in the global lis
On Wed, May 7, 2025 at 1:15 AM Christian König wrote:
>
> On 5/7/25 02:10, T.J. Mercier wrote:
> > The dmabuf iterator traverses the list of all DMA buffers.
> >
> > DMA buffers are refcounted through their associated struct file. A
> > reference is taken on each buf
.
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/dma-buf.c | 64
include/linux/dma-buf.h | 3 ++
kernel/bpf/Makefile | 3 ++
kernel/bpf/dmabuf_iter.c | 102 ++
4 files changed, 172 insertions(+)
create mode 100644 kernel/bpf
data compared to multiple reads from procfs, sysfs, or
multiple traditional BPF iterator invocations.
Signed-off-by: T.J. Mercier
---
kernel/bpf/dmabuf_iter.c | 47
kernel/bpf/helpers.c | 5 +
2 files changed, 52 insertions(+)
diff --git a/kernel
Use the same test buffers as the traditional iterator and a new BPF map
to verify the test buffers can be found with the open coded dmabuf
iterator.
Signed-off-by: T.J. Mercier
---
.../testing/selftests/bpf/bpf_experimental.h | 5 ++
.../selftests/bpf/prog_tests/dmabuf_iter.c| 52
to dma-buf: Rename debugfs symbols
Drop RFC: dma-buf: Remove DMA-BUF statistics
T.J. Mercier (5):
dma-buf: Rename debugfs symbols
bpf: Add dmabuf iterator
bpf: Add open coded dmabuf iterator
selftests/bpf: Add test for dmabuf_iter
selftests/bpf: Add test for open coded dmabuf_iter
This test creates a udmabuf, and a dmabuf from the system dmabuf heap,
and uses a BPF program that prints dmabuf metadata with the new
dmabuf_iter to verify they can be found.
Signed-off-by: T.J. Mercier
---
tools/testing/selftests/bpf/config| 3 +
.../selftests/bpf/prog_tests
Rename the debugfs list and mutex so it's clear they are now usable
without the need for CONFIG_DEBUG_FS. The list will always be populated
to support the creation of a BPF iterator for dmabufs.
Signed-off-by: T.J. Mercier
Reviewed-by: Christian König
---
drivers/dma-buf/dma-buf.c
On Mon, May 5, 2025 at 9:56 AM Christian König wrote:
>
> On 5/5/25 18:33, T.J. Mercier wrote:
> > On Mon, May 5, 2025 at 4:17 AM Christian König
> > wrote:
> >>
> >> On 5/5/25 00:41, T.J. Mercier wrote:
> >>> The dmabuf iterator traverses the
On Mon, May 5, 2025 at 4:17 AM Christian König wrote:
>
> On 5/5/25 00:41, T.J. Mercier wrote:
> > The dmabuf iterator traverses the list of all DMA buffers.
> >
> > DMA buffers are refcounted through their associated struct file. A
> > reference is taken on each buf
(6.18?) before actually removing it so that we
can have one longterm stable kernel version that supports both options
to facilitate a transition from the sysfs files to a BPF program.
Signed-off-by: T.J. Mercier
---
.../ABI/testing/sysfs-kernel-dmabuf-buffers | 24 ---
Documentation/driver-ap
.
Signed-off-by: T.J. Mercier
---
kernel/bpf/Makefile | 3 +
kernel/bpf/dmabuf_iter.c | 134 +++
2 files changed, 137 insertions(+)
create mode 100644 kernel/bpf/dmabuf_iter.c
diff --git a/kernel/bpf/Makefile b/kernel/bpf/Makefile
index 70502f038b92
Use the same test buffers as the traditional iterator and a new BPF map
to verify the test buffers can be found with the open coded dmabuf
iterator.
Signed-off-by: T.J. Mercier
---
.../testing/selftests/bpf/bpf_experimental.h | 5 ++
.../selftests/bpf/prog_tests/dmabuf_iter.c| 52
This test creates a udmabuf, and a dmabuf from the system dmabuf heap,
and uses a BPF program that prints dmabuf metadata with the new
dmabuf_iter to verify they can be found.
Signed-off-by: T.J. Mercier
---
tools/testing/selftests/bpf/config| 3 +
.../selftests/bpf/prog_tests
data compared to multiple reads from procfs, sysfs, or
multiple traditional BPF iterator invocations.
Signed-off-by: T.J. Mercier
---
kernel/bpf/dmabuf_iter.c | 43
kernel/bpf/helpers.c | 5 +
2 files changed, 48 insertions(+)
diff --git a/kernel
Expose the debugfs list and mutex so they are usable for the creation of
a BPF iterator for dmabufs without the need for CONFIG_DEBUG_FS. Rename
the symbols so it's clear debugfs is not required, and that the list
contains dmabufs and not some other type.
Signed-off-by: T.J. Mercier
---
v2:
n for selftest per Alexei Starovoitov
https://r.android.com/c/platform/system/bpfprogs/+/3616123/2/dmabufIter.c
https://r.android.com/c/platform/system/memory/libmeminfo/+/3614259/1/libdmabufinfo/dmabuf_bpf_stats.cpp
T.J. Mercier (6):
dma-buf: Rename and expose debugfs symbols
bpf: Add dmabuf i
On Tue, Apr 22, 2025 at 9:17 AM T.J. Mercier wrote:
>
> On Tue, Apr 22, 2025 at 1:24 AM Christian König
> wrote:
> >
> > Am 17.04.25 um 20:09 schrieb T.J. Mercier:
> > > struct dma_heap_attachment is a separate allocation from the struct
> > > sg_table
On Tue, Apr 22, 2025 at 4:01 PM Alexei Starovoitov
wrote:
>
> On Tue, Apr 22, 2025 at 12:57 PM T.J. Mercier wrote:
> >
> > On Mon, Apr 21, 2025 at 4:39 PM Alexei Starovoitov
> > wrote:
> > >
> > > On Mon, Apr 21, 2025 at 1:40 PM T.J. Mercier wrote
On Mon, Apr 21, 2025 at 4:39 PM Alexei Starovoitov
wrote:
>
> On Mon, Apr 21, 2025 at 1:40 PM T.J. Mercier wrote:
> >
> > > > new file mode 100644
> > > > index ..b4b8be1d6aa4
> > > > --- /dev/null
> > > > +++ b/kernel/bp
On Tue, Apr 22, 2025 at 1:24 AM Christian König
wrote:
>
> Am 17.04.25 um 20:09 schrieb T.J. Mercier:
> > struct dma_heap_attachment is a separate allocation from the struct
> > sg_table it contains, but there is no reason for this. Let's use the
> > slab allocator j
On Mon, Apr 21, 2025 at 10:58 AM Song Liu wrote:
>
> On Mon, Apr 14, 2025 at 3:53 PM T.J. Mercier wrote:
> >
> > The dmabuf iterator traverses the list of all DMA buffers. The list is
> > maintained only when CONFIG_DEBUG_FS is enabled.
> >
> > DMA buffers are
On Thu, Apr 17, 2025 at 1:26 PM Song Liu wrote:
>
> On Thu, Apr 17, 2025 at 9:05 AM T.J. Mercier wrote:
> >
> > On Wed, Apr 16, 2025 at 9:56 PM Song Liu wrote:
> > >
> > > On Wed, Apr 16, 2025 at 7:09 PM T.J. Mercier wrote:
> > > >
> &g
struct dma_heap_attachment is a separate allocation from the struct
sg_table it contains, but there is no reason for this. Let's use the
slab allocator just once instead of twice for dma_heap_attachment.
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/heaps/system_heap.c
On Wed, Apr 16, 2025 at 9:56 PM Song Liu wrote:
>
> On Wed, Apr 16, 2025 at 7:09 PM T.J. Mercier wrote:
> >
> > On Wed, Apr 16, 2025 at 6:26 PM Song Liu wrote:
> [...]
> > >
> > > Here is another rookie question, it appears to me there is a file
> >
On Wed, Apr 16, 2025 at 6:26 PM Song Liu wrote:
>
> On Wed, Apr 16, 2025 at 4:40 PM T.J. Mercier wrote:
> >
> > On Wed, Apr 16, 2025 at 4:08 PM Song Liu wrote:
> > >
> > > On Wed, Apr 16, 2025 at 3:51 PM T.J. Mercier wrote:
> > > [...]
> >
On Wed, Apr 16, 2025 at 4:08 PM Song Liu wrote:
>
> On Wed, Apr 16, 2025 at 3:51 PM T.J. Mercier wrote:
> [...]
> > >
> > > IIUC, the iterator simply traverses elements in a linked list. I feel it
> > > is
> > > an overkill to implement a ne
On Wed, Apr 16, 2025 at 3:02 PM Song Liu wrote:
>
> On Mon, Apr 14, 2025 at 3:53 PM T.J. Mercier wrote:
> [...]
> > +
> > +BTF_ID_LIST_GLOBAL_SINGLE(bpf_dmabuf_btf_id, struct, dma_buf)
> > +DEFINE_BPF_ITER_FUNC(dmabuf, struct bpf_iter_meta *meta, struct dma_buf
>
On Tue, Apr 15, 2025 at 9:43 PM kernel test robot wrote:
>
> Hi Mercier,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on bpf-next/net]
> [also build test ERROR on bpf-next/master bpf/master linus/master v6.15-rc2
> next-20250415]
> [If your patch is applied
ng up the extra space on line 321 too?
@@ -318,7 +318,7 @@ static struct page
*alloc_largest_available(unsigned long size,
int i;
for (i = 0; i < NUM_ORDERS; i++) {
- if (size < (PAGE_SIZE << orders[i]))
+ if (size < (PAGE_SIZE <<
(6.18?) before actually removing it so that we
can have one kernel version that supports both options to facilitate a
transition from the sysfs files to a BPF program.
Signed-off-by: T.J. Mercier
---
.../ABI/testing/sysfs-kernel-dmabuf-buffers | 24 ---
Documentation/driver-api/dma-bu
This test creates a udmabuf and uses a BPF program that prints dmabuf
metadata with the new dmabuf_iter to verify it can be found.
Signed-off-by: T.J. Mercier
---
tools/testing/selftests/bpf/config| 1 +
.../selftests/bpf/prog_tests/dmabuf_iter.c| 116
Expose the debugfs list and mutex so they are usable for the creation of
a BPF iterator for dmabufs. Rename the symbols so it's clear they
contain dmabufs and not some other type.
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/dma-buf.c | 22 +++---
include/linux/dma-
the bpf program execution without
holding the list mutex.
Signed-off-by: T.J. Mercier
---
include/linux/btf_ids.h | 1 +
kernel/bpf/Makefile | 3 +
kernel/bpf/dmabuf_iter.c | 130 +++
3 files changed, 134 insertions(+)
create mode 100644 kernel/bpf
, the
last patch is a RFC for removing it from the kernel. Please see my
suggestion there regarding the timeline for that.
[1]
https://lore.kernel.org/linux-media/20201210044400.1080308-1-hri...@google.com/
[2] https://lore.kernel.org/all/20220516171315.2400578-1-tjmerc...@google.com/
T.J. Mercier
On Mon, Apr 7, 2025 at 9:29 AM Maxime Ripard wrote:
>
> Some reserved memory regions might have particular memory setup or
> attributes that make them good candidates for heaps.
>
> Let's provide a heap type that will create a new heap for each reserved
> memory region flagged as such.
>
> Signed-
On Mon, Apr 7, 2025 at 4:46 AM Christian König wrote:
>
> Am 05.04.25 um 03:57 schrieb T.J. Mercier:
> > On Fri, Apr 4, 2025 at 1:47 AM Christian König
> > wrote:
> >> Hi Maxime,
> >>
> >> Am 03.04.25 um 17:47 schrieb Maxime Ripard:
> >>
On Fri, Apr 4, 2025 at 1:47 AM Christian König wrote:
>
> Hi Maxime,
>
> Am 03.04.25 um 17:47 schrieb Maxime Ripard:
> > On Thu, Apr 03, 2025 at 09:39:52AM +0200, Christian König wrote:
> >>> For the UMA GPU case where there is no device memory or eviction
> >>> problem, perhaps a configurable opt
On Fri, Mar 14, 2025 at 10:02 PM wrote:
>
> From: FengWei
>
> Use max3() macro instead of nesting max() to simplify the return
> statement.
>
> Signed-off-by: FengWei
The commit subject should include "dma-buf: heaps:" as a prefix.
With that:
Reviewed-by: T.J.
a specific allocator. The Linux kernel currently supports
> the
"represents"
> +following heaps:
> +
> + - The ``system`` heap allocates virtually contiguous, cacheable, buffers
Period at the end?
This description is my understanding of the current state of things, so:
Reviewed-by: T.J. Mercier
On Mon, Nov 18, 2024 at 1:15 AM Tvrtko Ursulin wrote:
>
>
> On 17/11/2024 17:03, T.J. Mercier wrote:
> > The arguments for __dma_buf_debugfs_list_del do not match for both the
> > CONFIG_DEBUG_FS case and the !CONFIG_DEBUG_FS case. The !CONFIG_DEBUG_FS
> > case should t
fs related code when
!CONFIG_DEBUG_FS")
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/dma-buf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 8892bc701a66..afb8c1c50107 100644
--- a/drivers/dma-buf/dma-buf.c
++
On Mon, Oct 21, 2024 at 9:30 AM Maxime Ripard wrote:
>
> Hi TJ,
>
> Thanks for your review
>
> On Tue, Oct 01, 2024 at 11:03:41PM +0200, T.J. Mercier wrote:
> > On Mon, Sep 30, 2024 at 4:41 PM Maxime Ripard wrote:
> > >
> > > Following a recent discu
word: 'by'
> +* has been killed by by SIGKILL
>
> total: 0 errors, 3 warnings, 405 lines checked
>
> Signed-off-by: Pintu Kumar
Reviewed-by: T.J. Mercier
The Android kernels have been doing this for over a year, so should be
pretty well tested at
Gaignard
> Cc: Brian Starkey
> Cc: John Stultz
> Cc: "T.J. Mercier"
> Cc: "Christian König"
> Cc: dri-devel@lists.freedesktop.org
> Cc: linaro-mm-...@lists.linaro.org
> Cc: linux-me...@vger.kernel.org
> Cc: linux-...@vger.kernel.org
> ---
&g
On Mon, Sep 9, 2024 at 11:06 PM Jens Wiklander
wrote:
>
> On Wed, Sep 4, 2024 at 11:42 PM T.J. Mercier wrote:
> >
> > On Wed, Sep 4, 2024 at 2:44 AM Jens Wiklander
> > wrote:
> > >
> > > On Tue, Sep 3, 2024 at 7:50 PM T.J. Mercier wrote:
> > &
On Tue, Sep 10, 2024 at 12:30 AM Christian König
wrote:
>
> Am 10.09.24 um 09:26 schrieb Tvrtko Ursulin:
> >
> > On 09/09/2024 21:53, T.J. Mercier wrote:
> >> A syncobj reference is taken in drm_syncobj_find, but not released if
> >> eventfd_ctx_fdget or kzall
A syncobj reference is taken in drm_syncobj_find, but not released if
eventfd_ctx_fdget or kzalloc fails. Put the reference in these error
paths.
Reported-by: Xingyu Jin
Fixes: c7a472297169 ("drm/syncobj: add IOCTL to register an eventfd")
Signed-off-by: T.J. Mercier
---
drive
Shrink the kernel .text a bit after successful initialization of the
heaps.
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/heaps/cma_heap.c| 4 ++--
drivers/dma-buf/heaps/system_heap.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dma-buf/heaps/cma_heap.c b
On Wed, Sep 4, 2024 at 2:44 AM Jens Wiklander wrote:
>
> On Tue, Sep 3, 2024 at 7:50 PM T.J. Mercier wrote:
> >
> > On Fri, Aug 30, 2024 at 12:04 AM Jens Wiklander
> > wrote:
> > >
> > > Add a Linaro restricted heap using the linaro,restricted-he
On Fri, Aug 30, 2024 at 12:04 AM Jens Wiklander
wrote:
>
> Add a Linaro restricted heap using the linaro,restricted-heap bindings
> implemented based on the generic restricted heap.
>
> The bindings defines a range of physical restricted memory. The heap
> manages this address range using genalloc
On Fri, Aug 30, 2024 at 12:04 AM Jens Wiklander
wrote:
>
> From: Etienne Carriere
>
> Enable userspace to create a tee_shm object that refers to a dmabuf
> reference.
>
> Userspace registers the dmabuf file descriptor as in a tee_shm object.
> The registration is completed with a tee_shm file des
y: Xingyu Jin
Fixes: a5d2d29e24be ("dma-buf: heaps: Move heap-helper logic into the cma_heap
implementation")
Cc: sta...@vger.kernel.org # Applicable >= 5.10. Needs adjustments only for
5.10.
Signed-off-by: T.J. Mercier
---
drivers/dma-buf/heaps/cma_heap.c | 2 +-
1 file changed, 1 insertio
On Tue, Jul 30, 2024 at 1:14 AM Huan Yang wrote:
>
>
> 在 2024/7/30 16:03, Christian König 写道:
> > Am 30.07.24 um 09:57 schrieb Huan Yang:
> >> Background
> >>
> >> Some user may need load file into dma-buf, current way is:
> >>1. allocate a dma-buf, get dma-buf fd
> >>2. mmap dma-buf
On Thu, Jul 25, 2024 at 4:52 AM Christian König
wrote:
>
> Am 20.07.24 um 09:15 schrieb Yunfei Dong:
> > From: "T.J. Mercier"
> >
> > The docs for dma_heap_get_name were incorrect, and since they were
> > duplicated in the header they were wrong th
On Wed, Jul 10, 2024 at 8:08 AM Lei Liu wrote:
>
>
> on 2024/7/10 22:48, Christian König wrote:
> > Am 10.07.24 um 16:35 schrieb Lei Liu:
> >>
> >> on 2024/7/10 22:14, Christian König wrote:
> >>> Am 10.07.24 um 15:57 schrieb Lei Liu:
> Use vm_insert_page to establish a mapping for the memory
On Mon, Jul 8, 2024 at 6:47 AM Zenghui Yu wrote:
>
> Even if a vgem device is configured in, we will skip the import_vgem_fd()
> test almost every time.
>
> TAP version 13
> 1..11
> # Testing heap: system
> # ===
> # Testing allocation and importing:
>
nel (hybrid) setup). In this, userspace
> ioctl structs now had to transport capabilities that needed 16 byte
> alignment, but the kernel was not putting these data buffers on that
> alignment boundary.
>
> Currently the largest type that is needed is a u64 so the alignment
> on
On Tue, Jun 11, 2024 at 2:35 AM wrote:
>
> From: Carsten Haitzler
>
> In a few places (core drm + AMD kfd driver), the ioctl handling uses a
> temporary 128 byte buffer on the stack to copy to/from user. ioctl data
> can have structs with types of much larger sizes than a byte and a
> system may
erification Center (linuxtesting.org).
>
> Fixes: 2989f6451084 ("dma-buf: Add selftests for dma-fence")
> Cc: sta...@vger.kernel.org
> Signed-off-by: Fedor Pchelkin
Reviewed-by: T.J. Mercier
> ---
> v2: use kthread_stop_put() to actually put the last reference as
>
On Wed, May 22, 2024 at 5:24 AM Fedor Pchelkin wrote:
>
> kthread creation may possibly fail inside race_signal_callback(). In
> such case stop the already started threads and return with error code.
>
> Found by Linux Verification Center (linuxtesting.org).
>
> Fixes: 2989f6451084 ("dma-buf: Add
On Tue, May 7, 2024 at 7:04 AM Christian König wrote:
>
> Am 07.05.24 um 15:39 schrieb Daniel Vetter:
> > On Tue, May 07, 2024 at 12:10:07PM +0200, Christian König wrote:
> >> Am 06.05.24 um 21:04 schrieb T.J. Mercier:
> >>> On Mon, May 6, 2024 at 2:30 AM Charan T
On Mon, May 6, 2024 at 2:30 AM Charan Teja Kalla
wrote:
>
> Hi TJ,
>
> Seems I have got answers from [1], where it is agreed upon epoll() is
> the source of issue.
>
> Thanks a lot for the discussion.
>
> [1] https://lore.kernel.org/lkml/2d631f0615918...@google.com/
>
> Thanks
> Charan
1 - 100 of 156 matches
Mail list logo