Re: [PATCH 3/4] drm/i915: Consolidate checks for engine stats availability

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

 



Quoting Tvrtko Ursulin (2017-11-28 12:41:29)
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index cf1cc2cb6722..a8e63779de79 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -1453,6 +1453,8 @@ int intel_guc_submission_enable(struct intel_guc *guc)
>                 execlists->tasklet.func = guc_submission_tasklet;
>                 engine->park = guc_submission_park;
>                 engine->unpark = guc_submission_unpark;
> +
> +               engine->flags &= ~I915_ENGINE_SUPPORTS_STATS;
>         }
>  
>         return 0;
> @@ -1465,6 +1467,8 @@ int intel_guc_submission_enable(struct intel_guc *guc)
>  void intel_guc_submission_disable(struct intel_guc *guc)
>  {
>         struct drm_i915_private *dev_priv = guc_to_i915(guc);
> +       struct intel_engine_cs *engine;
> +       enum intel_engine_id id;
>  
>         GEM_BUG_ON(dev_priv->gt.awake); /* GT should be parked first */
>  
> @@ -1473,6 +1477,9 @@ void intel_guc_submission_disable(struct intel_guc *guc)
>         /* Revert back to manual ELSP submission */
>         intel_engines_reset_default_submission(dev_priv);
>  
> +       for_each_engine(engine, dev_priv, id)
> +               engine->flags |= I915_ENGINE_SUPPORTS_STATS;

Push this into engine->reset_default_submission, then the guc isn't
making an assumption about the other end. We unconditionally clear when
the guc takes over because the guc doesn't provide the stats.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux