linux/drivers/gpu/drm/i915/display/intel_pps.h
<<
>>
Prefs
   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
  13struct drm_i915_private;
  14struct intel_connector;
  15struct intel_crtc_state;
  16struct intel_dp;
  17struct intel_encoder;
  18
  19intel_wakeref_t intel_pps_lock(struct intel_dp *intel_dp);
  20intel_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
  25void intel_pps_backlight_on(struct intel_dp *intel_dp);
  26void intel_pps_backlight_off(struct intel_dp *intel_dp);
  27void intel_pps_backlight_power(struct intel_connector *connector, bool enable);
  28
  29bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp);
  30void intel_pps_vdd_off_unlocked(struct intel_dp *intel_dp, bool sync);
  31void intel_pps_on_unlocked(struct intel_dp *intel_dp);
  32void intel_pps_off_unlocked(struct intel_dp *intel_dp);
  33void intel_pps_check_power_unlocked(struct intel_dp *intel_dp);
  34
  35void intel_pps_vdd_on(struct intel_dp *intel_dp);
  36void intel_pps_on(struct intel_dp *intel_dp);
  37void intel_pps_off(struct intel_dp *intel_dp);
  38void intel_pps_vdd_off_sync(struct intel_dp *intel_dp);
  39bool intel_pps_have_power(struct intel_dp *intel_dp);
  40void intel_pps_wait_power_cycle(struct intel_dp *intel_dp);
  41
  42void intel_pps_init(struct intel_dp *intel_dp);
  43void intel_pps_encoder_reset(struct intel_dp *intel_dp);
  44void intel_pps_reset_all(struct drm_i915_private *i915);
  45
  46void vlv_pps_init(struct intel_encoder *encoder,
  47                  const struct intel_crtc_state *crtc_state);
  48
  49void intel_pps_unlock_regs_wa(struct drm_i915_private *i915);
  50void intel_pps_setup(struct drm_i915_private *i915);
  51
  52#endif /* __INTEL_PPS_H__ */
  53