Re: [PATCH] drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking

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

 



Quoting Tvrtko Ursulin (2020-11-26 16:47:03)
> -static unsigned int config_enabled_bit(u64 config)
> +static unsigned int is_tracked_config(const u64 config)
>  {
> -       if (is_engine_config(config))
> +       unsigned int val;

> +/**
> + * Non-engine events that we need to track enabled-disabled transition and
> + * current state.
> + */

I'm not understanding what is_tracked_config() actually means and how
that becomes config_enabled_bit().

These look like the non-engine ones where we interact with HW during the
sample.

How do the events we define a bit for here differ from the "untracked"
events?

> +
> +       switch (config) {
> +       case I915_PMU_ACTUAL_FREQUENCY:
> +               val =  __I915_PMU_ACTUAL_FREQUENCY_ENABLED;
> +               break;
> +       case I915_PMU_REQUESTED_FREQUENCY:
> +               val = __I915_PMU_REQUESTED_FREQUENCY_ENABLED;
> +               break;
> +       case I915_PMU_RC6_RESIDENCY:
> +               val = __I915_PMU_RC6_RESIDENCY_ENABLED;
> +               break;
> +       default:
> +               return 0;
> +       }
> +
> +       return val + 1;
> +}
> +
> +static unsigned int config_enabled_bit(const u64 config)
> +{
> +       if (is_engine_config(config)) {
>                 return engine_config_sample(config);
> -       else
> -               return ENGINE_SAMPLE_BITS + (config - __I915_PMU_OTHER(0));
> +       } else {
> +               unsigned int bit = is_tracked_config(config);
> +
> +               if (bit)
> +                       return I915_ENGINE_SAMPLE_COUNT + bit - 1;
> +               else
> +                       return -1;
> +       }
>  }
_______________________________________________
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