#ifndef __INTEL_RUNTIME_PM_H__
#define __INTEL_RUNTIME_PM_H__
#include <linux/pm_runtime.h>
#include <linux/types.h>
#include "intel_wakeref.h"
struct device;
struct drm_i915_private;
struct drm_printer;
struct intel_runtime_pm { … };
#define BITS_PER_WAKEREF …
#define INTEL_RPM_WAKELOCK_SHIFT …
#define INTEL_RPM_WAKELOCK_BIAS …
#define INTEL_RPM_RAW_WAKEREF_MASK …
static inline int
intel_rpm_raw_wakeref_count(int wakeref_count)
{ … }
static inline int
intel_rpm_wakelock_count(int wakeref_count)
{ … }
static inline void
assert_rpm_device_not_suspended(struct intel_runtime_pm *rpm)
{ … }
static inline void
__assert_rpm_raw_wakeref_held(struct intel_runtime_pm *rpm, int wakeref_count)
{ … }
static inline void
__assert_rpm_wakelock_held(struct intel_runtime_pm *rpm, int wakeref_count)
{ … }
static inline void
assert_rpm_raw_wakeref_held(struct intel_runtime_pm *rpm)
{ … }
static inline void
assert_rpm_wakelock_held(struct intel_runtime_pm *rpm)
{ … }
static inline void
disable_rpm_wakeref_asserts(struct intel_runtime_pm *rpm)
{ … }
static inline void
enable_rpm_wakeref_asserts(struct intel_runtime_pm *rpm)
{ … }
void intel_runtime_pm_init_early(struct intel_runtime_pm *rpm);
void intel_runtime_pm_enable(struct intel_runtime_pm *rpm);
void intel_runtime_pm_disable(struct intel_runtime_pm *rpm);
void intel_runtime_pm_driver_release(struct intel_runtime_pm *rpm);
void intel_runtime_pm_driver_last_release(struct intel_runtime_pm *rpm);
intel_wakeref_t intel_runtime_pm_get(struct intel_runtime_pm *rpm);
intel_wakeref_t intel_runtime_pm_get_if_in_use(struct intel_runtime_pm *rpm);
intel_wakeref_t intel_runtime_pm_get_if_active(struct intel_runtime_pm *rpm);
intel_wakeref_t intel_runtime_pm_get_noresume(struct intel_runtime_pm *rpm);
intel_wakeref_t intel_runtime_pm_get_raw(struct intel_runtime_pm *rpm);
#define with_intel_runtime_pm(rpm, wf) …
#define with_intel_runtime_pm_if_in_use(rpm, wf) …
#define with_intel_runtime_pm_if_active(rpm, wf) …
void intel_runtime_pm_put_unchecked(struct intel_runtime_pm *rpm);
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
void intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref);
#else
static inline void
intel_runtime_pm_put(struct intel_runtime_pm *rpm, intel_wakeref_t wref)
{
intel_runtime_pm_put_unchecked(rpm);
}
#endif
void intel_runtime_pm_put_raw(struct intel_runtime_pm *rpm, intel_wakeref_t wref);
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM)
void print_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm,
struct drm_printer *p);
#else
static inline void print_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm,
struct drm_printer *p)
{
}
#endif
#endif