All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: drop printing the BO offset in the gem debugfs
@ 2018-05-11 15:40 Christian König
       [not found] ` <20180511154001.1754-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Christian König @ 2018-05-11 15:40 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

It is meaningless anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 7d3dc229fa47..c3f8c5573a97 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -803,10 +803,6 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
 	seq_printf(m, "\t0x%08x: %12ld byte %s",
 		   id, amdgpu_bo_size(bo), placement);
 
-	offset = READ_ONCE(bo->tbo.mem.start);
-	if (offset != AMDGPU_BO_INVALID_OFFSET)
-		seq_printf(m, " @ 0x%010Lx", offset);
-
 	pin_count = READ_ONCE(bo->pin_count);
 	if (pin_count)
 		seq_printf(m, " pin count %d", pin_count);
-- 
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] 4+ messages in thread

* [PATCH 2/2] drm/amdgpu: print the BO flags in the gem debugfs entry
       [not found] ` <20180511154001.1754-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-11 15:40   ` Christian König
       [not found]     ` <20180511154001.1754-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  2018-05-11 15:45   ` [PATCH 1/2] drm/amdgpu: drop printing the BO offset in the gem debugfs Alex Deucher
  1 sibling, 1 reply; 4+ messages in thread
From: Christian König @ 2018-05-11 15:40 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Quite usfull to know.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index c3f8c5573a97..b09030167c44 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -774,6 +774,12 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv,
 }
 
 #if defined(CONFIG_DEBUG_FS)
+
+#define amdgpu_debugfs_gem_bo_print_flag(m, bo, flag)	\
+	if (bo->flags & (AMDGPU_GEM_CREATE_ ## flag)) {	\
+		seq_printf((m), " " #flag);		\
+	}
+
 static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
 {
 	struct drm_gem_object *gobj = ptr;
@@ -815,6 +821,15 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
 	else if (dma_buf)
 		seq_printf(m, " exported as %p", dma_buf);
 
+	amdgpu_debugfs_gem_bo_print_flag(m, bo, CPU_ACCESS_REQUIRED);
+	amdgpu_debugfs_gem_bo_print_flag(m, bo, NO_CPU_ACCESS);
+	amdgpu_debugfs_gem_bo_print_flag(m, bo, CPU_GTT_USWC);
+	amdgpu_debugfs_gem_bo_print_flag(m, bo, VRAM_CLEARED);
+	amdgpu_debugfs_gem_bo_print_flag(m, bo, SHADOW);
+	amdgpu_debugfs_gem_bo_print_flag(m, bo, VRAM_CONTIGUOUS);
+	amdgpu_debugfs_gem_bo_print_flag(m, bo, VM_ALWAYS_VALID);
+	amdgpu_debugfs_gem_bo_print_flag(m, bo, EXPLICIT_SYNC);
+
 	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] 4+ messages in thread

* Re: [PATCH 2/2] drm/amdgpu: print the BO flags in the gem debugfs entry
       [not found]     ` <20180511154001.1754-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-11 15:44       ` Alex Deucher
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2018-05-11 15:44 UTC (permalink / raw)
  To: Christian König; +Cc: amd-gfx list

On Fri, May 11, 2018 at 11:40 AM, Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
> Quite usfull to know.

"useful"

With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index c3f8c5573a97..b09030167c44 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -774,6 +774,12 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv,
>  }
>
>  #if defined(CONFIG_DEBUG_FS)
> +
> +#define amdgpu_debugfs_gem_bo_print_flag(m, bo, flag)  \
> +       if (bo->flags & (AMDGPU_GEM_CREATE_ ## flag)) { \
> +               seq_printf((m), " " #flag);             \
> +       }
> +
>  static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
>  {
>         struct drm_gem_object *gobj = ptr;
> @@ -815,6 +821,15 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
>         else if (dma_buf)
>                 seq_printf(m, " exported as %p", dma_buf);
>
> +       amdgpu_debugfs_gem_bo_print_flag(m, bo, CPU_ACCESS_REQUIRED);
> +       amdgpu_debugfs_gem_bo_print_flag(m, bo, NO_CPU_ACCESS);
> +       amdgpu_debugfs_gem_bo_print_flag(m, bo, CPU_GTT_USWC);
> +       amdgpu_debugfs_gem_bo_print_flag(m, bo, VRAM_CLEARED);
> +       amdgpu_debugfs_gem_bo_print_flag(m, bo, SHADOW);
> +       amdgpu_debugfs_gem_bo_print_flag(m, bo, VRAM_CONTIGUOUS);
> +       amdgpu_debugfs_gem_bo_print_flag(m, bo, VM_ALWAYS_VALID);
> +       amdgpu_debugfs_gem_bo_print_flag(m, bo, EXPLICIT_SYNC);
> +
>         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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: drop printing the BO offset in the gem debugfs
       [not found] ` <20180511154001.1754-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  2018-05-11 15:40   ` [PATCH 2/2] drm/amdgpu: print the BO flags in the gem debugfs entry Christian König
@ 2018-05-11 15:45   ` Alex Deucher
  1 sibling, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2018-05-11 15:45 UTC (permalink / raw)
  To: Christian König; +Cc: amd-gfx list

On Fri, May 11, 2018 at 11:40 AM, Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
> It is meaningless anyway.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 7d3dc229fa47..c3f8c5573a97 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -803,10 +803,6 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data)
>         seq_printf(m, "\t0x%08x: %12ld byte %s",
>                    id, amdgpu_bo_size(bo), placement);
>
> -       offset = READ_ONCE(bo->tbo.mem.start);
> -       if (offset != AMDGPU_BO_INVALID_OFFSET)
> -               seq_printf(m, " @ 0x%010Lx", offset);
> -
>         pin_count = READ_ONCE(bo->pin_count);
>         if (pin_count)
>                 seq_printf(m, " pin count %d", pin_count);
> --
> 2.14.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-11 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 15:40 [PATCH 1/2] drm/amdgpu: drop printing the BO offset in the gem debugfs Christian König
     [not found] ` <20180511154001.1754-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-05-11 15:40   ` [PATCH 2/2] drm/amdgpu: print the BO flags in the gem debugfs entry Christian König
     [not found]     ` <20180511154001.1754-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-05-11 15:44       ` Alex Deucher
2018-05-11 15:45   ` [PATCH 1/2] drm/amdgpu: drop printing the BO offset in the gem debugfs Alex Deucher

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.