* [PATCH] drm/amdgpu: print DMA-buf status in debugfs
@ 2018-04-11 13:09 Christian König
[not found] ` <20180411130959.1690-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2018-04-11 13:09 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Just note if a BO was imported/exported.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 28c2706e48d7..93d3f333444b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -765,6 +765,8 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj);
struct seq_file *m = data;
+ struct dma_buf_attachment *attachment;
+ struct dma_buf *dma_buf;
unsigned domain;
const char *placement;
unsigned pin_count;
@@ -793,6 +795,15 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
pin_count = READ_ONCE(bo->pin_count);
if (pin_count)
seq_printf(m, " pin count %d", pin_count);
+
+ dma_buf = READ_ONCE(bo->gem_base.dma_buf);
+ attachment = READ_ONCE(bo->gem_base.import_attach);
+
+ if (attachment)
+ seq_printf(m, " imported from %p", dma_buf);
+ else if (dma_buf)
+ seq_printf(m, " exported as %p", dma_buf);
+
seq_printf(m, "\n");
return 0;
--
2.14.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: print DMA-buf status in debugfs
[not found] ` <20180411130959.1690-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
@ 2018-04-18 10:13 ` Christian König
[not found] ` <1aa486ab-5c15-5f56-9465-0d4bef5d2290-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2018-04-18 10:13 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Ping? Could anybody review that?
Thanks,
Christian.
Am 11.04.2018 um 15:09 schrieb Christian König:
> Just note if a BO was imported/exported.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 28c2706e48d7..93d3f333444b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -765,6 +765,8 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
> struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj);
> struct seq_file *m = data;
>
> + struct dma_buf_attachment *attachment;
> + struct dma_buf *dma_buf;
> unsigned domain;
> const char *placement;
> unsigned pin_count;
> @@ -793,6 +795,15 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
> pin_count = READ_ONCE(bo->pin_count);
> if (pin_count)
> seq_printf(m, " pin count %d", pin_count);
> +
> + dma_buf = READ_ONCE(bo->gem_base.dma_buf);
> + attachment = READ_ONCE(bo->gem_base.import_attach);
> +
> + if (attachment)
> + seq_printf(m, " imported from %p", dma_buf);
> + else if (dma_buf)
> + seq_printf(m, " exported as %p", dma_buf);
> +
> seq_printf(m, "\n");
>
> return 0;
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: print DMA-buf status in debugfs
[not found] ` <1aa486ab-5c15-5f56-9465-0d4bef5d2290-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-04-18 14:15 ` Deucher, Alexander
0 siblings, 0 replies; 3+ messages in thread
From: Deucher, Alexander @ 2018-04-18 14:15 UTC (permalink / raw)
To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 2182 bytes --]
Reviewed-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Christian König <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Sent: Wednesday, April 18, 2018 6:13:09 AM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: print DMA-buf status in debugfs
Ping? Could anybody review that?
Thanks,
Christian.
Am 11.04.2018 um 15:09 schrieb Christian König:
> Just note if a BO was imported/exported.
>
> Signed-off-by: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 28c2706e48d7..93d3f333444b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -765,6 +765,8 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
> struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj);
> struct seq_file *m = data;
>
> + struct dma_buf_attachment *attachment;
> + struct dma_buf *dma_buf;
> unsigned domain;
> const char *placement;
> unsigned pin_count;
> @@ -793,6 +795,15 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
> pin_count = READ_ONCE(bo->pin_count);
> if (pin_count)
> seq_printf(m, " pin count %d", pin_count);
> +
> + dma_buf = READ_ONCE(bo->gem_base.dma_buf);
> + attachment = READ_ONCE(bo->gem_base.import_attach);
> +
> + if (attachment)
> + seq_printf(m, " imported from %p", dma_buf);
> + else if (dma_buf)
> + seq_printf(m, " exported as %p", dma_buf);
> +
> seq_printf(m, "\n");
>
> return 0;
_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #1.2: Type: text/html, Size: 4147 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-18 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-11 13:09 [PATCH] drm/amdgpu: print DMA-buf status in debugfs Christian König
[not found] ` <20180411130959.1690-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-04-18 10:13 ` Christian König
[not found] ` <1aa486ab-5c15-5f56-9465-0d4bef5d2290-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-04-18 14:15 ` Deucher, Alexander
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.