root/drivers/gpu/drm/i915/gt/intel_engine_pm.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. intel_engine_pm_is_awake
  2. intel_engine_pm_get
  3. intel_engine_pm_get_if_awake
  4. intel_engine_pm_put

   1 /*
   2  * SPDX-License-Identifier: MIT
   3  *
   4  * Copyright © 2019 Intel Corporation
   5  */
   6 
   7 #ifndef INTEL_ENGINE_PM_H
   8 #define INTEL_ENGINE_PM_H
   9 
  10 #include "intel_engine_types.h"
  11 #include "intel_wakeref.h"
  12 
  13 static inline bool
  14 intel_engine_pm_is_awake(const struct intel_engine_cs *engine)
  15 {
  16         return intel_wakeref_is_active(&engine->wakeref);
  17 }
  18 
  19 static inline void intel_engine_pm_get(struct intel_engine_cs *engine)
  20 {
  21         intel_wakeref_get(&engine->wakeref);
  22 }
  23 
  24 static inline bool intel_engine_pm_get_if_awake(struct intel_engine_cs *engine)
  25 {
  26         return intel_wakeref_get_if_active(&engine->wakeref);
  27 }
  28 
  29 static inline void intel_engine_pm_put(struct intel_engine_cs *engine)
  30 {
  31         intel_wakeref_put(&engine->wakeref);
  32 }
  33 
  34 void intel_engine_init__pm(struct intel_engine_cs *engine);
  35 
  36 #endif /* INTEL_ENGINE_PM_H */

/* [<][>][^][v][top][bottom][index][help] */