* [PATCH] dma-buf: add the name field to the table header
@ 2022-04-28 6:39 ` Yuanzheng Song
0 siblings, 0 replies; 6+ messages in thread
From: Yuanzheng Song @ 2022-04-28 6:39 UTC (permalink / raw)
To: sumit.semwal, christian.koenig, dri-devel, linaro-mm-sig
Cc: linux-media, linux-kernel, Yuanzheng Song
'cat /sys/kernel/debug/dma_buf/bufinfo' will print the Dma-buf
Objects' information when the CONFIG_DEBUG_FS=y.
However, the printed table header information does not contain
the name field. So we need to add the name field to the table
header and use the '<none>' to replace the empty buf_obj->name.
Signed-off-by: Yuanzheng Song <songyuanzheng@huawei.com>
---
drivers/dma-buf/dma-buf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 79795857be3e..a2f9a1815e38 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1351,7 +1351,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
return ret;
seq_puts(s, "\nDma-buf Objects:\n");
- seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\n",
+ seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\tname\n",
"size", "flags", "mode", "count", "ino");
list_for_each_entry(buf_obj, &db_list.head, list_node) {
@@ -1368,7 +1368,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
file_count(buf_obj->file),
buf_obj->exp_name,
file_inode(buf_obj->file)->i_ino,
- buf_obj->name ?: "");
+ buf_obj->name ?: "<none>");
spin_unlock(&buf_obj->name_lock);
dma_resv_describe(buf_obj->resv, s);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] dma-buf: add the name field to the table header
@ 2022-04-28 6:39 ` Yuanzheng Song
0 siblings, 0 replies; 6+ messages in thread
From: Yuanzheng Song @ 2022-04-28 6:39 UTC (permalink / raw)
To: sumit.semwal, christian.koenig, dri-devel, linaro-mm-sig
Cc: Yuanzheng Song, linux-kernel, linux-media
'cat /sys/kernel/debug/dma_buf/bufinfo' will print the Dma-buf
Objects' information when the CONFIG_DEBUG_FS=y.
However, the printed table header information does not contain
the name field. So we need to add the name field to the table
header and use the '<none>' to replace the empty buf_obj->name.
Signed-off-by: Yuanzheng Song <songyuanzheng@huawei.com>
---
drivers/dma-buf/dma-buf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 79795857be3e..a2f9a1815e38 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1351,7 +1351,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
return ret;
seq_puts(s, "\nDma-buf Objects:\n");
- seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\n",
+ seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\tname\n",
"size", "flags", "mode", "count", "ino");
list_for_each_entry(buf_obj, &db_list.head, list_node) {
@@ -1368,7 +1368,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
file_count(buf_obj->file),
buf_obj->exp_name,
file_inode(buf_obj->file)->i_ino,
- buf_obj->name ?: "");
+ buf_obj->name ?: "<none>");
spin_unlock(&buf_obj->name_lock);
dma_resv_describe(buf_obj->resv, s);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dma-buf: add the name field to the table header
2022-04-28 6:39 ` Yuanzheng Song
@ 2022-04-28 8:03 ` Christian König
-1 siblings, 0 replies; 6+ messages in thread
From: Christian König @ 2022-04-28 8:03 UTC (permalink / raw)
To: Yuanzheng Song, sumit.semwal, dri-devel, linaro-mm-sig
Cc: linux-media, linux-kernel
Am 28.04.22 um 08:39 schrieb Yuanzheng Song:
> 'cat /sys/kernel/debug/dma_buf/bufinfo' will print the Dma-buf
> Objects' information when the CONFIG_DEBUG_FS=y.
> However, the printed table header information does not contain
> the name field. So we need to add the name field to the table
> header and use the '<none>' to replace the empty buf_obj->name.
>
> Signed-off-by: Yuanzheng Song <songyuanzheng@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Sumit do you want to push this or should I go ahead?
> ---
> drivers/dma-buf/dma-buf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index 79795857be3e..a2f9a1815e38 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -1351,7 +1351,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
> return ret;
>
> seq_puts(s, "\nDma-buf Objects:\n");
> - seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\n",
> + seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\tname\n",
> "size", "flags", "mode", "count", "ino");
>
> list_for_each_entry(buf_obj, &db_list.head, list_node) {
> @@ -1368,7 +1368,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
> file_count(buf_obj->file),
> buf_obj->exp_name,
> file_inode(buf_obj->file)->i_ino,
> - buf_obj->name ?: "");
> + buf_obj->name ?: "<none>");
> spin_unlock(&buf_obj->name_lock);
>
> dma_resv_describe(buf_obj->resv, s);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dma-buf: add the name field to the table header
@ 2022-04-28 8:03 ` Christian König
0 siblings, 0 replies; 6+ messages in thread
From: Christian König @ 2022-04-28 8:03 UTC (permalink / raw)
To: Yuanzheng Song, sumit.semwal, dri-devel, linaro-mm-sig
Cc: linux-kernel, linux-media
Am 28.04.22 um 08:39 schrieb Yuanzheng Song:
> 'cat /sys/kernel/debug/dma_buf/bufinfo' will print the Dma-buf
> Objects' information when the CONFIG_DEBUG_FS=y.
> However, the printed table header information does not contain
> the name field. So we need to add the name field to the table
> header and use the '<none>' to replace the empty buf_obj->name.
>
> Signed-off-by: Yuanzheng Song <songyuanzheng@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Sumit do you want to push this or should I go ahead?
> ---
> drivers/dma-buf/dma-buf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index 79795857be3e..a2f9a1815e38 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -1351,7 +1351,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
> return ret;
>
> seq_puts(s, "\nDma-buf Objects:\n");
> - seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\n",
> + seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\tname\n",
> "size", "flags", "mode", "count", "ino");
>
> list_for_each_entry(buf_obj, &db_list.head, list_node) {
> @@ -1368,7 +1368,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
> file_count(buf_obj->file),
> buf_obj->exp_name,
> file_inode(buf_obj->file)->i_ino,
> - buf_obj->name ?: "");
> + buf_obj->name ?: "<none>");
> spin_unlock(&buf_obj->name_lock);
>
> dma_resv_describe(buf_obj->resv, s);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dma-buf: add the name field to the table header
2022-04-28 8:03 ` Christian König
@ 2022-04-28 9:54 ` Sumit Semwal
-1 siblings, 0 replies; 6+ messages in thread
From: Sumit Semwal @ 2022-04-28 9:54 UTC (permalink / raw)
To: Christian König
Cc: Yuanzheng Song, dri-devel, linaro-mm-sig, linux-media, linux-kernel
Hi Christian,
On Thu, 28 Apr 2022 at 13:33, Christian König <christian.koenig@amd.com> wrote:
>
> Am 28.04.22 um 08:39 schrieb Yuanzheng Song:
> > 'cat /sys/kernel/debug/dma_buf/bufinfo' will print the Dma-buf
> > Objects' information when the CONFIG_DEBUG_FS=y.
> > However, the printed table header information does not contain
> > the name field. So we need to add the name field to the table
> > header and use the '<none>' to replace the empty buf_obj->name.
> >
> > Signed-off-by: Yuanzheng Song <songyuanzheng@huawei.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> Sumit do you want to push this or should I go ahead?
No worries, I can push it out.
Thanks :)
>
> > ---
> > drivers/dma-buf/dma-buf.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> > index 79795857be3e..a2f9a1815e38 100644
> > --- a/drivers/dma-buf/dma-buf.c
> > +++ b/drivers/dma-buf/dma-buf.c
> > @@ -1351,7 +1351,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
> > return ret;
> >
> > seq_puts(s, "\nDma-buf Objects:\n");
> > - seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\n",
> > + seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\tname\n",
> > "size", "flags", "mode", "count", "ino");
> >
> > list_for_each_entry(buf_obj, &db_list.head, list_node) {
> > @@ -1368,7 +1368,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
> > file_count(buf_obj->file),
> > buf_obj->exp_name,
> > file_inode(buf_obj->file)->i_ino,
> > - buf_obj->name ?: "");
> > + buf_obj->name ?: "<none>");
> > spin_unlock(&buf_obj->name_lock);
> >
> > dma_resv_describe(buf_obj->resv, s);
>
Best,
Sumit.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dma-buf: add the name field to the table header
@ 2022-04-28 9:54 ` Sumit Semwal
0 siblings, 0 replies; 6+ messages in thread
From: Sumit Semwal @ 2022-04-28 9:54 UTC (permalink / raw)
To: Christian König
Cc: linaro-mm-sig, Yuanzheng Song, linux-kernel, dri-devel, linux-media
Hi Christian,
On Thu, 28 Apr 2022 at 13:33, Christian König <christian.koenig@amd.com> wrote:
>
> Am 28.04.22 um 08:39 schrieb Yuanzheng Song:
> > 'cat /sys/kernel/debug/dma_buf/bufinfo' will print the Dma-buf
> > Objects' information when the CONFIG_DEBUG_FS=y.
> > However, the printed table header information does not contain
> > the name field. So we need to add the name field to the table
> > header and use the '<none>' to replace the empty buf_obj->name.
> >
> > Signed-off-by: Yuanzheng Song <songyuanzheng@huawei.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> Sumit do you want to push this or should I go ahead?
No worries, I can push it out.
Thanks :)
>
> > ---
> > drivers/dma-buf/dma-buf.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> > index 79795857be3e..a2f9a1815e38 100644
> > --- a/drivers/dma-buf/dma-buf.c
> > +++ b/drivers/dma-buf/dma-buf.c
> > @@ -1351,7 +1351,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
> > return ret;
> >
> > seq_puts(s, "\nDma-buf Objects:\n");
> > - seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\n",
> > + seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\tname\n",
> > "size", "flags", "mode", "count", "ino");
> >
> > list_for_each_entry(buf_obj, &db_list.head, list_node) {
> > @@ -1368,7 +1368,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
> > file_count(buf_obj->file),
> > buf_obj->exp_name,
> > file_inode(buf_obj->file)->i_ino,
> > - buf_obj->name ?: "");
> > + buf_obj->name ?: "<none>");
> > spin_unlock(&buf_obj->name_lock);
> >
> > dma_resv_describe(buf_obj->resv, s);
>
Best,
Sumit.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-05-02 13:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 6:39 [PATCH] dma-buf: add the name field to the table header Yuanzheng Song
2022-04-28 6:39 ` Yuanzheng Song
2022-04-28 8:03 ` Christian König
2022-04-28 8:03 ` Christian König
2022-04-28 9:54 ` Sumit Semwal
2022-04-28 9:54 ` Sumit Semwal
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.