On Fri, May 05, 2017 at 10:45:47AM -0700, Daniele Ceraolo Spurio wrote:
> We're currently deleting the GuC logs if the FW fails to load, but those
> are still useful to understand why the loading failed. Keeping the
> object around allows us to access them after driver load is completed.
> 
> v2: keep the object around instead of using kernel memory (chris)
>     don't store the logs in the gpu_error struct (Chris)
>     add a check on guc_log_level to avoid snapshotting empty logs
> 
> Cc: Chris Wilson <ch...@chris-wilson.co.uk>
> Cc: Oscar Mateo <oscar.ma...@intel.com>
> Cc: Michal Wajdeczko <michal.wajdec...@intel.com>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospu...@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c  | 30 ++++++++++++++++++------------
>  drivers/gpu/drm/i915/i915_drv.c      |  3 +++
>  drivers/gpu/drm/i915/intel_guc_log.c | 17 +++++++++++++++++
>  drivers/gpu/drm/i915/intel_uc.c      |  7 +++++--
>  drivers/gpu/drm/i915/intel_uc.h      |  5 +++++
>  5 files changed, 48 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
> b/drivers/gpu/drm/i915/i915_debugfs.c
> index 870c470..a37ab3b 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2544,25 +2544,31 @@ static int i915_guc_log_dump(struct seq_file *m, void 
> *data)
>  {
>       struct drm_i915_private *dev_priv = node_to_i915(m->private);
>       struct drm_i915_gem_object *obj;
> -     int i = 0, pg;
> +     u32 *log;
> +     int i = 0;
>  
> -     if (!dev_priv->guc.log.vma)
> +     if (dev_priv->guc.log.vma)
> +             obj = dev_priv->guc.log.vma->obj;
> +     else if (dev_priv->guc.err_load_log)
> +             obj = dev_priv->guc.err_load_log;
> +     else
>               return 0;

Since both could be available at the same time, and to be clear which you
are reporting, I think you want a new debugfs entry.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to