From: Ben Widawsky Subject: Re: [PATCH] drm/i915: print object bindings in debugfs Date: Fri, 18 Oct 2013 14:39:06 -0700 Message-ID: <20131018213905.GA7541@bwidawsk.net> References: <1382109507-5271-1-git-send-email-daniel.vetter@ffwll.ch> <20131018163352.GB29799@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id E8180E66BE for ; Fri, 18 Oct 2013 14:39:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20131018163352.GB29799@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Fri, Oct 18, 2013 at 05:33:52PM +0100, Chris Wilson wrote: > On Fri, Oct 18, 2013 at 05:18:27PM +0200, Daniel Vetter wrote: > > This is useful when we only have aliasing ppgtt and want to figure out > > what exactly is accesssible and what not. Paulo can somehow overwrite > > the fbcon framebuffer with the blitter on his hsw machine ... > > > > Cc: Paulo Zanoni > > Signed-off-by: Daniel Vetter > > --- > > drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > > index 061182a..e0a3b56 100644 > > --- a/drivers/gpu/drm/i915/i915_debugfs.c > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > > @@ -124,7 +124,9 @@ static inline const char *get_global_flag(struct drm_i915_gem_object *obj) > > static void > > describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) > > { > > + struct drm_i915_private *dev_priv = obj->base.dev->dev_private; > > struct i915_vma *vma; > > + > > seq_printf(m, "%pK: %s%s%s %8zdKiB %02x %02x %u %u %u%s%s%s", > > &obj->base, > > get_pin_flag(obj), > > @@ -155,6 +157,10 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) > > seq_printf(m, "gtt offset: %08lx, size: %08lx)", > > vma->node.start, vma->node.size); > > } > > + if (dev_priv->mm.aliasing_ppgtt) > > + seq_pritnf(" (bindings: %s%s)", > > + obj->has_global_gtt_mapping ? "g" : "", > > + obj->has_aliasing_ppgtt_mapping ? "pp" : ""); > > So we have: > > ...(bindings: )... > ...(bindings: g)... > ...(bindings: pp)... > ...(bindings: gpp)... > > That looks more confusing than informative atm. > -Chris > This is why I opted to leave just 'g' in get_global_flag. A lack of a g inplies ppgtt. Also fwiw, this info is already there unless I didn't follow what you did: list_for_each_entry(vma, &obj->vma_list, vma_link) { if (!i915_is_ggtt(vma->vm)) seq_puts(m, " (pp"); else seq_puts(m, " (g"); seq_printf(m, "gtt offset: %08lx, size: %08lx)", vma->node.start, vma->node.size); } -- Ben Widawsky, Intel Open Source Technology Center