Re: [RFC 3/4] drm/i915/pmu: Convert sampling to gt

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

 




On 01/08/2019 11:29, Chris Wilson wrote:
Quoting Tvrtko Ursulin (2019-08-01 11:18:24)
  static void
-frequency_sample(struct drm_i915_private *dev_priv, unsigned int period_ns)
+frequency_sample(struct intel_gt *gt, unsigned int period_ns)
  {
-       if (dev_priv->pmu.enable &
-           config_enabled_mask(I915_PMU_ACTUAL_FREQUENCY)) {
+       struct drm_i915_private *i915 = gt->i915;
+       struct intel_uncore *uncore = gt->uncore;
+       struct i915_pmu *pmu = &i915->pmu;
+
+       if (pmu->enable & config_enabled_mask(I915_PMU_ACTUAL_FREQUENCY)) {
                 u32 val;
- val = dev_priv->gt_pm.rps.cur_freq;
-               if (dev_priv->gt.awake) {
+               val = i915->gt_pm.rps.cur_freq;
+               if (gt->awake) {
                         intel_wakeref_t wakeref;
- with_intel_runtime_pm_if_in_use(&dev_priv->runtime_pm,
+                       with_intel_runtime_pm_if_in_use(&i915->runtime_pm,
                                                         wakeref) {

We can replace this wakeref with
	if (intel_gt_pm_get_if_awake()) {
instead of if (gt->awake);

Don't see it in my tree?

Which reminds me I had some patches to change the rc6 sampling over
runtime suspend -- from your last vacation! My timing is perfect.

Okay, maybe doable. Can put on top of this series if I can merge the trivial refactors quickly today?

Regards,

Tvrtko
_______________________________________________
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