drm/i915/pps: rename intel_edp_backlight_* to intel_pps_backlight_*
[sfrench/cifs-2.6.git] / drivers / gpu / drm / i915 / display / intel_pps.h
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2020 Intel Corporation
4  */
5
6 #ifndef __INTEL_PPS_H__
7 #define __INTEL_PPS_H__
8
9 #include <linux/types.h>
10
11 #include "intel_wakeref.h"
12
13 struct drm_i915_private;
14 struct intel_connector;
15 struct intel_crtc_state;
16 struct intel_dp;
17 struct intel_encoder;
18
19 intel_wakeref_t intel_pps_lock(struct intel_dp *intel_dp);
20 intel_wakeref_t intel_pps_unlock(struct intel_dp *intel_dp, intel_wakeref_t wakeref);
21
22 #define with_intel_pps_lock(dp, wf)                                             \
23         for ((wf) = intel_pps_lock(dp); (wf); (wf) = intel_pps_unlock((dp), (wf)))
24
25 void intel_dp_check_edp(struct intel_dp *intel_dp);
26 void intel_pps_backlight_on(struct intel_dp *intel_dp);
27 void intel_pps_backlight_off(struct intel_dp *intel_dp);
28 void intel_pps_backlight_power(struct intel_connector *connector, bool enable);
29
30 bool edp_panel_vdd_on(struct intel_dp *intel_dp);
31 void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync);
32 void edp_panel_vdd_off_sync(struct intel_dp *intel_dp);
33 void edp_panel_on(struct intel_dp *intel_dp);
34 void edp_panel_off(struct intel_dp *intel_dp);
35 void edp_panel_vdd_work(struct work_struct *__work);
36
37 void intel_edp_panel_vdd_on(struct intel_dp *intel_dp);
38 void intel_edp_panel_on(struct intel_dp *intel_dp);
39 void intel_edp_panel_off(struct intel_dp *intel_dp);
40 bool intel_edp_have_power(struct intel_dp *intel_dp);
41
42 void intel_edp_panel_vdd_sanitize(struct intel_dp *intel_dp);
43
44 void wait_panel_power_cycle(struct intel_dp *intel_dp);
45
46 void intel_dp_pps_init(struct intel_dp *intel_dp);
47 void intel_power_sequencer_reset(struct drm_i915_private *i915);
48 void intel_dp_init_panel_power_timestamps(struct intel_dp *intel_dp);
49
50 void vlv_init_panel_power_sequencer(struct intel_encoder *encoder,
51                                     const struct intel_crtc_state *crtc_state);
52
53 #endif /* __INTEL_PPS_H__ */