Re: [PATCH v6 2/2] 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-29 09:27:56)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Sagar noticed the check can be consolidated between the engine stats
> implementation and the PMU.
> 
> My first choice was a static inline helper but that got into include
> ordering mess quickly fast so I went with a macro instead. At some point
> we should perhaps looking into taking out the non-ringubffer bits from
> intel_ringbuffer.h into a new intel_engine.h or something.
> 
> v2: Use engine->flags. (Chris Wilson)
> v3: Rebase and mark GuC as not yet supported. (Chris Wilson)
> v4: Move flag setting to intel_engines_reset_default_submission.
>     (Chris Wilson)
> v5: Move flag setting to logical_ring_setup.
> v6: intel_engines_reset_default_submission is the wrong place to set the
>     flag - it needs to be in execlists_set_default_submission. (Sagar)
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Suggested-by: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
> Cc: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
> Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> (v2)
> ---
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 570864583e28..ef513e1c10f3 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1919,6 +1919,8 @@ static void execlists_set_default_submission(struct intel_engine_cs *engine)
>  
>         engine->park = NULL;
>         engine->unpark = NULL;
> +
> +       engine->flags |= I915_ENGINE_SUPPORTS_STATS;
>  }
>  
>  static void
> @@ -1963,6 +1965,8 @@ logical_ring_setup(struct intel_engine_cs *engine)
>         /* Intentionally left blank. */
>         engine->buffer = NULL;
>  
> +       engine->flags |= I915_ENGINE_SUPPORTS_STATS;

Now that you've added it to execlists_set_default_submission, you can
remove the flag from here, as it will be set by the call from
intel_engine_init_common().

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]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux