Re: [PATCH 09/14] drm/xe: Add GuC Submit Engine snapshot to xe_devcoredump.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 26, 2023 at 04:57:08PM -0400, Rodrigo Vivi wrote:
> Let's start to move our existent logs to devcoredump one by
> one. Any format change should come on follow-up work.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

Reviewed-by: Matthew Brost <matthew.brost@xxxxxxxxx>

> ---
>  drivers/gpu/drm/xe/xe_devcoredump.c       | 7 ++++++-
>  drivers/gpu/drm/xe/xe_devcoredump_types.h | 2 ++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
> index 795581c58d90..0e7ec654a9f2 100644
> --- a/drivers/gpu/drm/xe/xe_devcoredump.c
> +++ b/drivers/gpu/drm/xe/xe_devcoredump.c
> @@ -12,6 +12,7 @@
>  #include "xe_engine.h"
>  #include "xe_gt.h"
>  #include "xe_guc_ct.h"
> +#include "xe_guc_submit.h"
>  
>  /**
>   * DOC: Xe device coredump
> @@ -89,6 +90,7 @@ static ssize_t xe_devcoredump_read(char *buffer, loff_t offset,
>  
>  	drm_printf(&p, "\n**** GuC CT ****\n");
>  	xe_guc_ct_snapshot_print(coredump->snapshot.ct, &p);
> +	xe_guc_engine_snapshot_print(coredump->snapshot.ge, &p);
>  
>  	mutex_unlock(&coredump->lock);
>  
> @@ -106,6 +108,7 @@ static void xe_devcoredump_free(void *data)
>  	mutex_lock(&coredump->lock);
>  
>  	xe_guc_ct_snapshot_free(coredump->snapshot.ct);
> +	xe_guc_engine_snapshot_free(coredump->snapshot.ge);
>  
>  	coredump->faulty_engine = NULL;
>  	drm_info(&coredump_to_xe(coredump)->drm,
> @@ -117,13 +120,15 @@ static void xe_devcoredump_free(void *data)
>  static void devcoredump_snapshot(struct xe_devcoredump *coredump)
>  {
>  	struct xe_devcoredump_snapshot *ss = &coredump->snapshot;
> -	struct xe_guc *guc = engine_to_guc(coredump->faulty_engine);
> +	struct xe_engine *e = coredump->faulty_engine;
> +	struct xe_guc *guc = engine_to_guc(e);
>  
>  	lockdep_assert_held(&coredump->lock);
>  	ss->snapshot_time = ktime_get_real();
>  	ss->boot_time = ktime_get_boottime();
>  
>  	coredump->snapshot.ct = xe_guc_ct_snapshot_capture(&guc->ct);
> +	coredump->snapshot.ge = xe_guc_engine_snapshot_capture(e);
>  }
>  
>  /**
> diff --git a/drivers/gpu/drm/xe/xe_devcoredump_types.h b/drivers/gpu/drm/xe/xe_devcoredump_types.h
> index 1e44d5346364..e055b266af70 100644
> --- a/drivers/gpu/drm/xe/xe_devcoredump_types.h
> +++ b/drivers/gpu/drm/xe/xe_devcoredump_types.h
> @@ -27,6 +27,8 @@ struct xe_devcoredump_snapshot {
>  	/* GuC snapshots */
>  	/** @ct_snapshot: GuC CT snapshot */
>  	struct xe_guc_ct_snapshot *ct;
> +	/** @ge: Guc Engine snapshot */
> +	struct xe_guc_submit_engine_snapshot *ge;
>  };
>  
>  /**
> -- 
> 2.39.2
> 



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux