Re: [PATCH 2/2] drm/i915/pmu: Use GT parked for estimating RC6 while asleep

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

 



Quoting Chris Wilson (2019-08-05 10:43:33)
> As we track when we put the GT device to sleep upon idling, we can use
> that callback to sample the current rc6 counters and record the
> timestamp for estimating samples after that point while asleep.
> 
> v2: Stick to using ktime_t
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105010
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c |  21 +++--
>  drivers/gpu/drm/i915/i915_pmu.c     | 120 ++++++++++++++--------------
>  drivers/gpu/drm/i915/i915_pmu.h     |   4 +-
>  3 files changed, 69 insertions(+), 76 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 8953336f2ae5..bcb8081f564f 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -39,6 +39,7 @@
>  #include "display/intel_psr.h"
>  
>  #include "gem/i915_gem_context.h"
> +#include "gt/intel_gt_pm.h"
>  #include "gt/intel_reset.h"
>  #include "gt/uc/intel_guc_submission.h"
>  
> @@ -3996,13 +3997,11 @@ static int i915_sseu_status(struct seq_file *m, void *unused)
>  static int i915_forcewake_open(struct inode *inode, struct file *file)
>  {
>         struct drm_i915_private *i915 = inode->i_private;
> +       struct intel_gt *gt = &i915->gt;
>  
> -       if (INTEL_GEN(i915) < 6)
> -               return 0;
> -
> -       file->private_data =
> -               (void *)(uintptr_t)intel_runtime_pm_get(&i915->runtime_pm);
> -       intel_uncore_forcewake_user_get(&i915->uncore);
> +       intel_gt_pm_get(gt);
> +       if (INTEL_GEN(i915) >= 6)
> +               intel_uncore_forcewake_user_get(gt->uncore);

And this interacts badly with the plan to use wait_for_idle. :|
So be it.
-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