[Intel-gfx] [RFC 02/11] drm/i915: Add intel_energy_uJ
Chris Wilson
chris at chris-wilson.co.uk
Thu Sep 14 19:49:59 UTC 2017
Quoting Tvrtko Ursulin (2017-09-11 16:25:50)
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 60461f49936b..ff67df8d99fa 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -9369,3 +9369,28 @@ u64 intel_rc6_residency_ns(struct drm_i915_private *dev_priv,
>
> return res;
> }
> +
> +unsigned long long intel_energy_uJ(struct drm_i915_private *dev_priv)
> +{
> + unsigned long long power;
> + unsigned long units;
> +
> + if (GEM_WARN_ON(INTEL_GEN(dev_priv) < 6))
> + return 0;
> +
> + intel_runtime_pm_get(dev_priv);
Same question on lifting the rpm_get to the caller?
-Chris
More information about the Intel-gfx
mailing list