Skip to content

Commit

Permalink
drm/i915/pmu: Make get_rc6 take intel_gt
Browse files Browse the repository at this point in the history
RC6 is a GT state so make the function parameter reflect that.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190801162330.2729-4-tvrtko.ursulin@linux.intel.com
  • Loading branch information
Tvrtko Ursulin authored and Chris Wilson committed Aug 1, 2019
1 parent 08ce5c6 commit 518ea58
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/gpu/drm/i915/i915_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,9 @@ static int i915_pmu_event_init(struct perf_event *event)
return 0;
}

static u64 __get_rc6(struct drm_i915_private *i915)
static u64 __get_rc6(struct intel_gt *gt)
{
struct drm_i915_private *i915 = gt->i915;
u64 val;

val = intel_rc6_residency_ns(i915,
Expand All @@ -449,9 +450,10 @@ static u64 __get_rc6(struct drm_i915_private *i915)
return val;
}

static u64 get_rc6(struct drm_i915_private *i915)
static u64 get_rc6(struct intel_gt *gt)
{
#if IS_ENABLED(CONFIG_PM)
struct drm_i915_private *i915 = gt->i915;
struct intel_runtime_pm *rpm = &i915->runtime_pm;
struct i915_pmu *pmu = &i915->pmu;
intel_wakeref_t wakeref;
Expand All @@ -460,7 +462,7 @@ static u64 get_rc6(struct drm_i915_private *i915)

wakeref = intel_runtime_pm_get_if_in_use(rpm);
if (wakeref) {
val = __get_rc6(i915);
val = __get_rc6(gt);
intel_runtime_pm_put(rpm, wakeref);

/*
Expand Down Expand Up @@ -523,7 +525,7 @@ static u64 get_rc6(struct drm_i915_private *i915)

return val;
#else
return __get_rc6(i915);
return __get_rc6(gt);
#endif
}

Expand Down Expand Up @@ -566,7 +568,7 @@ static u64 __i915_pmu_event_read(struct perf_event *event)
val = count_interrupts(i915);
break;
case I915_PMU_RC6_RESIDENCY:
val = get_rc6(i915);
val = get_rc6(&i915->gt);
break;
}
}
Expand Down

0 comments on commit 518ea58

Please sign in to comment.