xref: /openbmc/linux/drivers/gpu/drm/i915/gt/intel_engine_pm.h (revision 8bf3cbe32b180836720f735e6de5dee700052317)
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 struct drm_i915_private;
14 
15 void intel_engine_pm_get(struct intel_engine_cs *engine);
16 void intel_engine_pm_put(struct intel_engine_cs *engine);
17 
18 static inline bool
19 intel_engine_pm_get_if_awake(struct intel_engine_cs *engine)
20 {
21 	return intel_wakeref_get_if_active(&engine->wakeref);
22 }
23 
24 void intel_engine_park(struct intel_engine_cs *engine);
25 
26 void intel_engine_init__pm(struct intel_engine_cs *engine);
27 
28 #endif /* INTEL_ENGINE_PM_H */
29