All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Tvrtko Ursulin" <tvrtko.ursulin@intel.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/i915/debugfs: Do not report currently active engine when describing objects
Date: Fri, 17 Sep 2021 14:43:33 +0200	[thread overview]
Message-ID: <YUSNdZsDxWnxWL6F@phenom.ffwll.local> (raw)
In-Reply-To: <20210915114153.951670-1-tvrtko.ursulin@linux.intel.com>

On Wed, Sep 15, 2021 at 12:41:53PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> It is not very useful to have code which tries to report a rapidly
> transient state which will not report anything majority of the time,
> especially since it is currently only used from
> <debugfs>/i915_gem_framebuffers.

Maybe mention that this is motiveated by Christian's series to rework all
the fence iteration stuff.

Also iirc the history here, this was for figuring out hangs. When the gpu
is dead, the last-write stuff isn't very transient anymore (until reset).
But we have error state capture now since forever, so this can go.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_object.h | 17 -----------------
>  drivers/gpu/drm/i915/i915_debugfs.c        |  5 -----
>  2 files changed, 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
> index 48112b9d76df..3043fcbd31bd 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
> @@ -503,23 +503,6 @@ i915_gem_object_finish_access(struct drm_i915_gem_object *obj)
>  	i915_gem_object_unpin_pages(obj);
>  }
>  
> -static inline struct intel_engine_cs *
> -i915_gem_object_last_write_engine(struct drm_i915_gem_object *obj)
> -{
> -	struct intel_engine_cs *engine = NULL;
> -	struct dma_fence *fence;
> -
> -	rcu_read_lock();
> -	fence = dma_resv_get_excl_unlocked(obj->base.resv);
> -	rcu_read_unlock();
> -
> -	if (fence && dma_fence_is_i915(fence) && !dma_fence_is_signaled(fence))
> -		engine = to_request(fence)->engine;
> -	dma_fence_put(fence);
> -
> -	return engine;
> -}
> -
>  void i915_gem_object_set_cache_coherency(struct drm_i915_gem_object *obj,
>  					 unsigned int cache_level);
>  void i915_gem_object_flush_if_display(struct drm_i915_gem_object *obj);
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 04351a851586..1795af81bf41 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -139,7 +139,6 @@ void
>  i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
> -	struct intel_engine_cs *engine;
>  	struct i915_vma *vma;
>  	int pin_count = 0;
>  
> @@ -229,10 +228,6 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
>  		seq_printf(m, " (stolen: %08llx)", obj->stolen->start);
>  	if (i915_gem_object_is_framebuffer(obj))
>  		seq_printf(m, " (fb)");
> -
> -	engine = i915_gem_object_last_write_engine(obj);
> -	if (engine)
> -		seq_printf(m, " (%s)", engine->name);
>  }
>  
>  static int i915_gem_object_info(struct seq_file *m, void *data)
> -- 
> 2.30.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Tvrtko Ursulin" <tvrtko.ursulin@intel.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/debugfs: Do not report currently active engine when describing objects
Date: Fri, 17 Sep 2021 14:43:33 +0200	[thread overview]
Message-ID: <YUSNdZsDxWnxWL6F@phenom.ffwll.local> (raw)
In-Reply-To: <20210915114153.951670-1-tvrtko.ursulin@linux.intel.com>

On Wed, Sep 15, 2021 at 12:41:53PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> It is not very useful to have code which tries to report a rapidly
> transient state which will not report anything majority of the time,
> especially since it is currently only used from
> <debugfs>/i915_gem_framebuffers.

Maybe mention that this is motiveated by Christian's series to rework all
the fence iteration stuff.

Also iirc the history here, this was for figuring out hangs. When the gpu
is dead, the last-write stuff isn't very transient anymore (until reset).
But we have error state capture now since forever, so this can go.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Acked-by: Christian König <christian.koenig@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_object.h | 17 -----------------
>  drivers/gpu/drm/i915/i915_debugfs.c        |  5 -----
>  2 files changed, 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
> index 48112b9d76df..3043fcbd31bd 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
> @@ -503,23 +503,6 @@ i915_gem_object_finish_access(struct drm_i915_gem_object *obj)
>  	i915_gem_object_unpin_pages(obj);
>  }
>  
> -static inline struct intel_engine_cs *
> -i915_gem_object_last_write_engine(struct drm_i915_gem_object *obj)
> -{
> -	struct intel_engine_cs *engine = NULL;
> -	struct dma_fence *fence;
> -
> -	rcu_read_lock();
> -	fence = dma_resv_get_excl_unlocked(obj->base.resv);
> -	rcu_read_unlock();
> -
> -	if (fence && dma_fence_is_i915(fence) && !dma_fence_is_signaled(fence))
> -		engine = to_request(fence)->engine;
> -	dma_fence_put(fence);
> -
> -	return engine;
> -}
> -
>  void i915_gem_object_set_cache_coherency(struct drm_i915_gem_object *obj,
>  					 unsigned int cache_level);
>  void i915_gem_object_flush_if_display(struct drm_i915_gem_object *obj);
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 04351a851586..1795af81bf41 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -139,7 +139,6 @@ void
>  i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
> -	struct intel_engine_cs *engine;
>  	struct i915_vma *vma;
>  	int pin_count = 0;
>  
> @@ -229,10 +228,6 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
>  		seq_printf(m, " (stolen: %08llx)", obj->stolen->start);
>  	if (i915_gem_object_is_framebuffer(obj))
>  		seq_printf(m, " (fb)");
> -
> -	engine = i915_gem_object_last_write_engine(obj);
> -	if (engine)
> -		seq_printf(m, " (%s)", engine->name);
>  }
>  
>  static int i915_gem_object_info(struct seq_file *m, void *data)
> -- 
> 2.30.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  parent reply	other threads:[~2021-09-17 12:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 11:41 [PATCH] drm/i915/debugfs: Do not report currently active engine when describing objects Tvrtko Ursulin
2021-09-15 11:41 ` [Intel-gfx] " Tvrtko Ursulin
2021-09-15 13:53 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2021-09-17 12:43 ` Daniel Vetter [this message]
2021-09-17 12:43   ` [Intel-gfx] [PATCH] " Daniel Vetter
2021-09-17 13:59   ` Tvrtko Ursulin
2021-09-17 13:59     ` [Intel-gfx] " Tvrtko Ursulin
2021-09-20 11:58 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/debugfs: Do not report currently active engine when describing objects (rev2) Patchwork
2021-09-21 15:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/debugfs: Do not report currently active engine when describing objects (rev3) Patchwork
2021-09-21 18:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YUSNdZsDxWnxWL6F@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tvrtko.ursulin@intel.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.