[Intel-gfx] [PATCH] drm/i915/guc: Dump the GuC stage descriptor pool in debugfs
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Mon May 8 11:28:24 UTC 2017
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 at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Signed-off-by: Oscar Mateo <oscar.mateo at 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 at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list