0001
0002
0003
0004
0005
0006 #ifndef __INTEL_PPS_H__
0007 #define __INTEL_PPS_H__
0008
0009 #include <linux/types.h>
0010
0011 #include "intel_wakeref.h"
0012
0013 enum pipe;
0014 struct drm_i915_private;
0015 struct intel_connector;
0016 struct intel_crtc_state;
0017 struct intel_dp;
0018 struct intel_encoder;
0019
0020 intel_wakeref_t intel_pps_lock(struct intel_dp *intel_dp);
0021 intel_wakeref_t intel_pps_unlock(struct intel_dp *intel_dp, intel_wakeref_t wakeref);
0022
0023 #define with_intel_pps_lock(dp, wf) \
0024 for ((wf) = intel_pps_lock(dp); (wf); (wf) = intel_pps_unlock((dp), (wf)))
0025
0026 void intel_pps_backlight_on(struct intel_dp *intel_dp);
0027 void intel_pps_backlight_off(struct intel_dp *intel_dp);
0028 void intel_pps_backlight_power(struct intel_connector *connector, bool enable);
0029
0030 bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp);
0031 void intel_pps_vdd_off_unlocked(struct intel_dp *intel_dp, bool sync);
0032 void intel_pps_on_unlocked(struct intel_dp *intel_dp);
0033 void intel_pps_off_unlocked(struct intel_dp *intel_dp);
0034 void intel_pps_check_power_unlocked(struct intel_dp *intel_dp);
0035
0036 void intel_pps_vdd_on(struct intel_dp *intel_dp);
0037 void intel_pps_on(struct intel_dp *intel_dp);
0038 void intel_pps_off(struct intel_dp *intel_dp);
0039 void intel_pps_vdd_off_sync(struct intel_dp *intel_dp);
0040 bool intel_pps_have_panel_power_or_vdd(struct intel_dp *intel_dp);
0041 void intel_pps_wait_power_cycle(struct intel_dp *intel_dp);
0042
0043 void intel_pps_init(struct intel_dp *intel_dp);
0044 void intel_pps_init_late(struct intel_dp *intel_dp);
0045 void intel_pps_encoder_reset(struct intel_dp *intel_dp);
0046 void intel_pps_reset_all(struct drm_i915_private *i915);
0047
0048 void vlv_pps_init(struct intel_encoder *encoder,
0049 const struct intel_crtc_state *crtc_state);
0050
0051 void intel_pps_unlock_regs_wa(struct drm_i915_private *i915);
0052 void intel_pps_setup(struct drm_i915_private *i915);
0053
0054 void assert_pps_unlocked(struct drm_i915_private *i915, enum pipe pipe);
0055
0056 #endif