[Intel-gfx] [PATCH v3 2/3] drm/i915/hwmon: Add helper function to obtain energy values

Dixit, Ashutosh ashutosh.dixit at intel.com
Tue Nov 22 02:35:31 UTC 2022


On Sun, 20 Nov 2022 23:29:45 -0800, Riana Tauro wrote:
>
> diff --git a/drivers/gpu/drm/i915/i915_hwmon.h b/drivers/gpu/drm/i915/i915_hwmon.h
> index 7ca9cf2c34c9..a6c8efeb868d 100644
> --- a/drivers/gpu/drm/i915/i915_hwmon.h
> +++ b/drivers/gpu/drm/i915/i915_hwmon.h
> @@ -12,6 +12,7 @@ struct drm_i915_private;
>  #if IS_REACHABLE(CONFIG_HWMON)
>  void i915_hwmon_register(struct drm_i915_private *i915);
>  void i915_hwmon_unregister(struct drm_i915_private *i915);
> +int i915_hwmon_get_energy(struct drm_i915_private *i915, long *energy);
>  #else
>  static inline void i915_hwmon_register(struct drm_i915_private *i915) { };
>  static inline void i915_hwmon_unregister(struct drm_i915_private *i915) { };

What about the #else case?


More information about the Intel-gfx mailing list