linux-zen-desktop/drivers/gpu/drm/i915/i915_hwmon.h

28 lines
888 B
C
Raw Permalink Normal View History

2023-08-30 17:31:07 +02:00
/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2022 Intel Corporation
*/
#ifndef __I915_HWMON_H__
#define __I915_HWMON_H__
2023-10-24 12:59:35 +02:00
#include <linux/types.h>
2023-08-30 17:31:07 +02:00
struct drm_i915_private;
2023-10-24 12:59:35 +02:00
struct intel_gt;
2023-08-30 17:31:07 +02:00
#if IS_REACHABLE(CONFIG_HWMON)
void i915_hwmon_register(struct drm_i915_private *i915);
void i915_hwmon_unregister(struct drm_i915_private *i915);
2023-10-24 12:59:35 +02:00
void i915_hwmon_power_max_disable(struct drm_i915_private *i915, bool *old);
void i915_hwmon_power_max_restore(struct drm_i915_private *i915, bool old);
2023-08-30 17:31:07 +02:00
#else
static inline void i915_hwmon_register(struct drm_i915_private *i915) { };
static inline void i915_hwmon_unregister(struct drm_i915_private *i915) { };
2023-10-24 12:59:35 +02:00
static inline void i915_hwmon_power_max_disable(struct drm_i915_private *i915, bool *old) { };
static inline void i915_hwmon_power_max_restore(struct drm_i915_private *i915, bool old) { };
2023-08-30 17:31:07 +02:00
#endif
#endif /* __I915_HWMON_H__ */