All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Weinehall <david.weinehall@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/i915: debugfs spring cleaning
Date: Tue, 9 Aug 2016 10:46:25 +0300	[thread overview]
Message-ID: <20160809074625.747clguwx2wi5uxg@boom> (raw)
In-Reply-To: <20160808152856.GE23417@nuc-i3427.alporthouse.com>

On Mon, Aug 08, 2016 at 04:28:56PM +0100, Chris Wilson wrote:
> On Mon, Aug 08, 2016 at 04:20:01PM +0300, David Weinehall wrote:
> > @@ -136,13 +140,14 @@ static void
> >  describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
> > +	struct drm_device *dev = &dev_priv->drm;
> >  	struct intel_engine_cs *engine;
> >  	struct i915_vma *vma;
> >  	unsigned int frontbuffer_bits;
> >  	int pin_count = 0;
> >  	enum intel_engine_id id;
> >  
> > -	lockdep_assert_held(&obj->base.dev->struct_mutex);
> > +	lockdep_assert_held(&dev->struct_mutex);
> 
> This is not a good tradeoff however. lockdep_assert_held() is
> conditional code that should be compiled out,
> 
> >  
> >  	seq_printf(m, "%pK: %c%c%c%c%c %8zdKiB %02x %02x [ ",
> >  		   &obj->base,
> > @@ -157,13 +162,13 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
> >  	for_each_engine_id(engine, dev_priv, id)
> >  		seq_printf(m, "%x ",
> >  			   i915_gem_active_get_seqno(&obj->last_read[id],
> > -						     &obj->base.dev->struct_mutex));
> > +						     &dev->struct_mutex));
> 
> Same again here.
> 
> >  	seq_printf(m, "] %x %x%s%s%s",
> >  		   i915_gem_active_get_seqno(&obj->last_write,
> > -					     &obj->base.dev->struct_mutex),
> > +					     &dev->struct_mutex),
> >  		   i915_gem_active_get_seqno(&obj->last_fence,
> > -					     &obj->base.dev->struct_mutex),
> > -		   i915_cache_level_str(to_i915(obj->base.dev), obj->cache_level),
> > +					     &dev->struct_mutex),
> > +		   i915_cache_level_str(dev_priv, obj->cache_level),
> >  		   obj->dirty ? " dirty" : "",
> >  		   obj->madv == I915_MADV_DONTNEED ? " purgeable" : "");
> >  	if (obj->base.name)
> > @@ -201,7 +206,7 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
> >  	}
> >  
> >  	engine = i915_gem_active_get_engine(&obj->last_write,
> > -					    &obj->base.dev->struct_mutex);
> > +					    &dev->struct_mutex);
> 
> and again.
> 
> I'm quite happy with dev_priv->drm and need a strong argument to
> introduce dev = &dev_priv->drm locals. dev_priv->drm should avoid the
> need for the compiler to emit any locals should they go out of scope.

Thanks for the feedback.  Will fix.


Regards: David
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-08-09  7:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 13:19 [PATCH 0/5] Various cleanup David Weinehall
2016-08-08 13:19 ` [PATCH 1/5] drm/i915: Cosmetic fixes in i915_drv.h David Weinehall
2016-08-08 15:20   ` Chris Wilson
2016-08-08 13:19 ` [PATCH 2/5] drm/i915: Consistent struct device * naming David Weinehall
2016-08-08 15:21   ` Chris Wilson
2016-08-08 13:19 ` [PATCH 3/5] drm/i915: sysfs spring cleaning David Weinehall
2016-08-08 15:23   ` Chris Wilson
2016-08-09  7:45     ` David Weinehall
2016-08-09 10:52   ` [PATCH 3/5 v2] " David Weinehall
2016-08-08 13:20 ` [PATCH 4/5] drm/i915: pdev cleanup David Weinehall
2016-08-08 15:25   ` Chris Wilson
2016-08-12 11:10   ` [PATCH 4/5 v2] " David Weinehall
2016-08-12 12:15     ` Chris Wilson
2016-08-08 13:20 ` [PATCH 5/5] drm/i915: debugfs spring cleaning David Weinehall
2016-08-08 15:28   ` Chris Wilson
2016-08-09  7:46     ` David Weinehall [this message]
2016-08-09 10:52   ` [PATCH 5/5 v2] " David Weinehall
2016-08-12 11:20   ` [PATCH 5/5 v3] " David Weinehall
2016-08-12 12:03     ` Chris Wilson
2016-08-12 12:36       ` David Weinehall
2016-08-12 12:43     ` Dave Gordon
2016-08-12 12:55       ` David Weinehall
2016-08-15  9:14       ` David Weinehall
2016-08-15  9:11     ` [PATCH 5/5 v4] " David Weinehall
2016-08-08 13:48 ` ✗ Ro.CI.BAT: failure for Various cleanup (rev2) 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=20160809074625.747clguwx2wi5uxg@boom \
    --to=david.weinehall@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.