Re: [PATCH 1/3] drm/i915/guc: Don't open log relay if GuC is not running

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

 



Quoting Michal Wajdeczko (2019-08-18 10:52:02)
> As we plan to continue driver load after GuC initialization
> failure, we can't assume that GuC log data will be available
> just because GuC was initially enabled. We must check that
> GuC is still running instead.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc_log.c |  4 ++++
>  drivers/gpu/drm/i915/i915_debugfs.c        | 17 +++++++++--------
>  2 files changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> index 59702ebc68f6..36332064de9c 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> @@ -372,6 +372,7 @@ static int guc_log_relay_create(struct intel_guc_log *log)
>         int ret;
>  
>         lockdep_assert_held(&log->relay.lock);
> +       GEM_BUG_ON(!log->vma);
>  
>          /* Keep the size of sub buffers same as shared log buffer */
>         subbuf_size = log->vma->size;
> @@ -554,6 +555,9 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
>  {
>         int ret;
>  
> +       if (!log->vma)
> +               return -ENODEV;

Ok, this is called from debugfs so after registration when the presence
or not of the log->vma is static.

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux