linux/drivers/gpu/drm/i915/display/intel_pps.c

// SPDX-License-Identifier: MIT
/*
 * Copyright © 2020 Intel Corporation
 */

#include "g4x_dp.h"
#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_de.h"
#include "intel_display_power_well.h"
#include "intel_display_types.h"
#include "intel_dp.h"
#include "intel_dpio_phy.h"
#include "intel_dpll.h"
#include "intel_lvds.h"
#include "intel_lvds_regs.h"
#include "intel_pps.h"
#include "intel_pps_regs.h"
#include "intel_quirks.h"

static void vlv_steal_power_sequencer(struct intel_display *display,
				      enum pipe pipe);

static void pps_init_delays(struct intel_dp *intel_dp);
static void pps_init_registers(struct intel_dp *intel_dp, bool force_disable_vdd);

static const char *pps_name(struct intel_dp *intel_dp)
{}

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)
{}

static void
vlv_power_sequencer_kick(struct intel_dp *intel_dp)
{}

static enum pipe vlv_find_free_pps(struct intel_display *display)
{}

static enum pipe
vlv_power_sequencer_pipe(struct intel_dp *intel_dp)
{}

static int
bxt_power_sequencer_idx(struct intel_dp *intel_dp)
{}

pps_check;

static bool pps_has_pp_on(struct intel_display *display, int pps_idx)
{}

static bool pps_has_vdd_on(struct intel_display *display, int pps_idx)
{}

static bool pps_any(struct intel_display *display, int pps_idx)
{}

static enum pipe
vlv_initial_pps_pipe(struct intel_display *display,
		     enum port port, pps_check check)
{}

static void
vlv_initial_power_sequencer_setup(struct intel_dp *intel_dp)
{}

static int intel_num_pps(struct intel_display *display)
{}

static bool intel_pps_is_valid(struct intel_dp *intel_dp)
{}

static int
bxt_initial_pps_idx(struct intel_display *display, pps_check check)
{}

static bool
pps_initial_setup(struct intel_dp *intel_dp)
{}

void intel_pps_reset_all(struct intel_display *display)
{}

struct pps_registers {};

static void intel_pps_get_registers(struct intel_dp *intel_dp,
				    struct pps_registers *regs)
{}

static i915_reg_t
_pp_ctrl_reg(struct intel_dp *intel_dp)
{}

static i915_reg_t
_pp_stat_reg(struct intel_dp *intel_dp)
{}

static bool edp_have_panel_power(struct intel_dp *intel_dp)
{}

static bool edp_have_panel_vdd(struct intel_dp *intel_dp)
{}

void intel_pps_check_power_unlocked(struct intel_dp *intel_dp)
{}

#define IDLE_ON_MASK
#define IDLE_ON_VALUE

#define IDLE_OFF_MASK
#define IDLE_OFF_VALUE

#define IDLE_CYCLE_MASK
#define IDLE_CYCLE_VALUE

static void intel_pps_verify_state(struct intel_dp *intel_dp);

static void wait_panel_status(struct intel_dp *intel_dp,
			      u32 mask, u32 value)
{}

static void wait_panel_on(struct intel_dp *intel_dp)
{}

static void wait_panel_off(struct intel_dp *intel_dp)
{}

static void wait_panel_power_cycle(struct intel_dp *intel_dp)
{}

void intel_pps_wait_power_cycle(struct intel_dp *intel_dp)
{}

static void wait_backlight_on(struct intel_dp *intel_dp)
{}

static void edp_wait_backlight_off(struct intel_dp *intel_dp)
{}

/* Read the current pp_control value, unlocking the register if it
 * is locked
 */

static  u32 ilk_get_pp_control(struct intel_dp *intel_dp)
{}

/*
 * Must be paired with intel_pps_vdd_off_unlocked().
 * Must hold pps_mutex around the whole on/off sequence.
 * Can be nested with intel_pps_vdd_{on,off}() calls.
 */
bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp)
{}

/*
 * Must be paired with intel_pps_off().
 * Nested calls to these functions are not allowed since
 * we drop the lock. Caller must use some higher level
 * locking to prevent nested calls from other threads.
 */
void intel_pps_vdd_on(struct intel_dp *intel_dp)
{}

static void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp)
{}

void intel_pps_vdd_off_sync(struct intel_dp *intel_dp)
{}

static void edp_panel_vdd_work(struct work_struct *__work)
{}

static void edp_panel_vdd_schedule_off(struct intel_dp *intel_dp)
{}

/*
 * Must be paired with edp_panel_vdd_on().
 * Must hold pps_mutex around the whole on/off sequence.
 * Can be nested with intel_pps_vdd_{on,off}() calls.
 */
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_on(struct intel_dp *intel_dp)
{}

void intel_pps_off_unlocked(struct intel_dp *intel_dp)
{}

void intel_pps_off(struct intel_dp *intel_dp)
{}

/* Enable backlight in the panel power control. */
void intel_pps_backlight_on(struct intel_dp *intel_dp)
{}

/* Disable backlight in the panel power control. */
void intel_pps_backlight_off(struct intel_dp *intel_dp)
{}

/*
 * Hook for controlling the panel power control backlight through the bl_power
 * sysfs attribute. Take care to handle multiple calls.
 */
void intel_pps_backlight_power(struct intel_connector *connector, bool enable)
{}

static void vlv_detach_power_sequencer(struct intel_dp *intel_dp)
{}

static void vlv_steal_power_sequencer(struct intel_display *display,
				      enum pipe pipe)
{}

void vlv_pps_init(struct intel_encoder *encoder,
		  const struct intel_crtc_state *crtc_state)
{}

static void pps_vdd_init(struct intel_dp *intel_dp)
{}

bool intel_pps_have_panel_power_or_vdd(struct intel_dp *intel_dp)
{}

static void pps_init_timestamps(struct intel_dp *intel_dp)
{}

static void
intel_pps_readout_hw_state(struct intel_dp *intel_dp, struct edp_power_seq *seq)
{}

static void
intel_pps_dump_state(struct intel_dp *intel_dp, const char *state_name,
		     const struct edp_power_seq *seq)
{}

static void
intel_pps_verify_state(struct intel_dp *intel_dp)
{}

static bool pps_delays_valid(struct edp_power_seq *delays)
{}

static void pps_init_delays_bios(struct intel_dp *intel_dp,
				 struct edp_power_seq *bios)
{}

static void pps_init_delays_vbt(struct intel_dp *intel_dp,
				struct edp_power_seq *vbt)
{}

static void pps_init_delays_spec(struct intel_dp *intel_dp,
				 struct edp_power_seq *spec)
{}

static void pps_init_delays(struct intel_dp *intel_dp)
{}

static void pps_init_registers(struct intel_dp *intel_dp, bool force_disable_vdd)
{}

void intel_pps_encoder_reset(struct intel_dp *intel_dp)
{}

bool intel_pps_init(struct intel_dp *intel_dp)
{}

static void pps_init_late(struct intel_dp *intel_dp)
{}

void intel_pps_init_late(struct intel_dp *intel_dp)
{}

void intel_pps_unlock_regs_wa(struct intel_display *display)
{}

void intel_pps_setup(struct intel_display *display)
{}

static int intel_pps_show(struct seq_file *m, void *data)
{}
DEFINE_SHOW_ATTRIBUTE();

void intel_pps_connector_debugfs_add(struct intel_connector *connector)
{}

void assert_pps_unlocked(struct intel_display *display, enum pipe pipe)
{}