Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Oscar Mateo <oscar.mateo@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/guc: Dump the GuC stage descriptor pool in debugfs
Date: Mon, 08 May 2017 14:28:24 +0300	[thread overview]
Message-ID: <1494242904.3367.27.camel@linux.intel.com> (raw)
In-Reply-To: <1493994891-5182-1-git-send-email-oscar.mateo@intel.com>

On pe, 2017-05-05 at 14:34 +0000, Oscar Mateo wrote:
> We are missing pieces of information that could be useful for GuC
> debugging.
> 
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 61 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 61 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 870c470..a05a67d 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2540,6 +2540,66 @@ static int i915_guc_info(struct seq_file *m, void *data)
> >  	return 0;
>  }
>  
> +static int i915_guc_stage_pool(struct seq_file *m, void *data)
> +{
> +	struct drm_i915_private *dev_priv = node_to_i915(m->private);
> +	const struct intel_guc *guc = &dev_priv->guc;
> +	struct guc_stage_desc *desc = guc->stage_desc_pool_vaddr;
> +	struct i915_guc_client *client = guc->execbuf_client;
> +	unsigned int tmp;
> +	int index;
> +
> +	if (!client) {
> +		seq_printf(m, "GuC submission %s\n",
> +			   HAS_GUC(dev_priv) ?
> +			   "disabled" :
> +			   "not supported");
> +		return 0;
> +	}

De-dupe above fragment into a separate static function;

	if (!check_guc(dev_priv))
		return 0;

It could be applied to the other GuC functions, too.

Then this is;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2017-05-08 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 14:34 [PATCH] drm/i915/guc: Dump the GuC stage descriptor pool in debugfs Oscar Mateo
2017-05-05 21:54 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-05-08 11:28 ` Joonas Lahtinen [this message]

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=1494242904.3367.27.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=oscar.mateo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox