2021-01-08 17:44:09 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
/*
|
|
|
|
* Copyright © 2020 Intel Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __INTEL_PPS_H__
|
|
|
|
#define __INTEL_PPS_H__
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
#include "intel_wakeref.h"
|
|
|
|
|
|
|
|
struct drm_i915_private;
|
|
|
|
struct intel_connector;
|
|
|
|
struct intel_crtc_state;
|
|
|
|
struct intel_dp;
|
|
|
|
struct intel_encoder;
|
|
|
|
|
2021-01-08 17:44:10 +00:00
|
|
|
intel_wakeref_t intel_pps_lock(struct intel_dp *intel_dp);
|
|
|
|
intel_wakeref_t intel_pps_unlock(struct intel_dp *intel_dp, intel_wakeref_t wakeref);
|
2021-01-08 17:44:09 +00:00
|
|
|
|
2021-01-08 17:44:10 +00:00
|
|
|
#define with_intel_pps_lock(dp, wf) \
|
|
|
|
for ((wf) = intel_pps_lock(dp); (wf); (wf) = intel_pps_unlock((dp), (wf)))
|
2021-01-08 17:44:09 +00:00
|
|
|
|
2021-01-08 17:44:11 +00:00
|
|
|
void intel_pps_backlight_on(struct intel_dp *intel_dp);
|
|
|
|
void intel_pps_backlight_off(struct intel_dp *intel_dp);
|
|
|
|
void intel_pps_backlight_power(struct intel_connector *connector, bool enable);
|
2021-01-08 17:44:09 +00:00
|
|
|
|
2021-01-08 17:44:13 +00:00
|
|
|
bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp);
|
|
|
|
void intel_pps_vdd_off_unlocked(struct intel_dp *intel_dp, bool sync);
|
|
|
|
void intel_pps_on_unlocked(struct intel_dp *intel_dp);
|
|
|
|
void intel_pps_off_unlocked(struct intel_dp *intel_dp);
|
2021-01-08 17:44:17 +00:00
|
|
|
void intel_pps_check_power_unlocked(struct intel_dp *intel_dp);
|
2021-01-08 17:44:09 +00:00
|
|
|
|
2021-01-08 17:44:12 +00:00
|
|
|
void intel_pps_vdd_on(struct intel_dp *intel_dp);
|
|
|
|
void intel_pps_on(struct intel_dp *intel_dp);
|
|
|
|
void intel_pps_off(struct intel_dp *intel_dp);
|
2021-01-08 17:44:14 +00:00
|
|
|
void intel_pps_vdd_off_sync(struct intel_dp *intel_dp);
|
2021-01-08 17:44:12 +00:00
|
|
|
bool intel_pps_have_power(struct intel_dp *intel_dp);
|
2021-01-08 17:44:19 +00:00
|
|
|
void intel_pps_wait_power_cycle(struct intel_dp *intel_dp);
|
2021-01-08 17:44:09 +00:00
|
|
|
|
2021-01-08 17:44:15 +00:00
|
|
|
void intel_pps_init(struct intel_dp *intel_dp);
|
2021-01-08 17:44:16 +00:00
|
|
|
void intel_pps_encoder_reset(struct intel_dp *intel_dp);
|
2021-01-08 17:44:18 +00:00
|
|
|
void intel_pps_reset_all(struct drm_i915_private *i915);
|
2021-01-08 17:44:09 +00:00
|
|
|
|
2021-01-08 17:44:20 +00:00
|
|
|
void vlv_pps_init(struct intel_encoder *encoder,
|
|
|
|
const struct intel_crtc_state *crtc_state);
|
2021-01-08 17:44:09 +00:00
|
|
|
|
2021-01-20 10:18:32 +00:00
|
|
|
void intel_pps_unlock_regs_wa(struct drm_i915_private *i915);
|
|
|
|
void intel_pps_setup(struct drm_i915_private *i915);
|
|
|
|
|
2021-01-08 17:44:09 +00:00
|
|
|
#endif /* __INTEL_PPS_H__ */
|