linux/drivers/gpu/drm/msm/dp/dp_catalog.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt)

#include <linux/delay.h>
#include <linux/iopoll.h>
#include <linux/platform_device.h>
#include <linux/rational.h>
#include <drm/display/drm_dp_helper.h>
#include <drm/drm_print.h>

#include "dp_catalog.h"
#include "dp_reg.h"

#define POLLING_SLEEP_US
#define POLLING_TIMEOUT_US

#define SCRAMBLER_RESET_COUNT_VALUE

#define DP_INTERRUPT_STATUS_ACK_SHIFT
#define DP_INTERRUPT_STATUS_MASK_SHIFT

#define DP_INTF_CONFIG_DATABUS_WIDEN

#define DP_INTERRUPT_STATUS1

#define DP_INTERRUPT_STATUS1_ACK
#define DP_INTERRUPT_STATUS1_MASK

#define DP_INTERRUPT_STATUS2

#define DP_INTERRUPT_STATUS2_ACK
#define DP_INTERRUPT_STATUS2_MASK

#define DP_INTERRUPT_STATUS4

#define DP_INTERRUPT_MASK4

#define DP_DEFAULT_AHB_OFFSET
#define DP_DEFAULT_AHB_SIZE
#define DP_DEFAULT_AUX_OFFSET
#define DP_DEFAULT_AUX_SIZE
#define DP_DEFAULT_LINK_OFFSET
#define DP_DEFAULT_LINK_SIZE
#define DP_DEFAULT_P0_OFFSET
#define DP_DEFAULT_P0_SIZE

struct dss_io_region {};

struct dss_io_data {};

struct dp_catalog_private {};

void dp_catalog_snapshot(struct dp_catalog *dp_catalog, struct msm_disp_state *disp_state)
{}

static inline u32 dp_read_aux(struct dp_catalog_private *catalog, u32 offset)
{}

static inline void dp_write_aux(struct dp_catalog_private *catalog,
			       u32 offset, u32 data)
{}

static inline u32 dp_read_ahb(const struct dp_catalog_private *catalog, u32 offset)
{}

static inline void dp_write_ahb(struct dp_catalog_private *catalog,
			       u32 offset, u32 data)
{}

static inline void dp_write_p0(struct dp_catalog_private *catalog,
			       u32 offset, u32 data)
{}

static inline u32 dp_read_p0(struct dp_catalog_private *catalog,
			       u32 offset)
{}

static inline u32 dp_read_link(struct dp_catalog_private *catalog, u32 offset)
{}

static inline void dp_write_link(struct dp_catalog_private *catalog,
			       u32 offset, u32 data)
{}

/* aux related catalog functions */
u32 dp_catalog_aux_read_data(struct dp_catalog *dp_catalog)
{}

int dp_catalog_aux_write_data(struct dp_catalog *dp_catalog, u32 data)
{}

int dp_catalog_aux_write_trans(struct dp_catalog *dp_catalog, u32 data)
{}

int dp_catalog_aux_clear_trans(struct dp_catalog *dp_catalog, bool read)
{}

int dp_catalog_aux_clear_hw_interrupts(struct dp_catalog *dp_catalog)
{}

/**
 * dp_catalog_aux_reset() - reset AUX controller
 *
 * @dp_catalog: DP catalog structure
 *
 * return: void
 *
 * This function reset AUX controller
 *
 * NOTE: reset AUX controller will also clear any pending HPD related interrupts
 * 
 */
void dp_catalog_aux_reset(struct dp_catalog *dp_catalog)
{}

void dp_catalog_aux_enable(struct dp_catalog *dp_catalog, bool enable)
{}

int dp_catalog_aux_wait_for_hpd_connect_state(struct dp_catalog *dp_catalog,
					      unsigned long wait_us)
{}

static void dump_regs(void __iomem *base, int len)
{}

void dp_catalog_dump_regs(struct dp_catalog *dp_catalog)
{}

u32 dp_catalog_aux_get_irq(struct dp_catalog *dp_catalog)
{}

/* controller related catalog functions */
void dp_catalog_ctrl_update_transfer_unit(struct dp_catalog *dp_catalog,
				u32 dp_tu, u32 valid_boundary,
				u32 valid_boundary2)
{}

void dp_catalog_ctrl_state_ctrl(struct dp_catalog *dp_catalog, u32 state)
{}

void dp_catalog_ctrl_config_ctrl(struct dp_catalog *dp_catalog, u32 cfg)
{}

void dp_catalog_ctrl_lane_mapping(struct dp_catalog *dp_catalog)
{}

void dp_catalog_ctrl_psr_mainlink_enable(struct dp_catalog *dp_catalog,
						bool enable)
{}

void dp_catalog_ctrl_mainlink_ctrl(struct dp_catalog *dp_catalog,
						bool enable)
{}

void dp_catalog_ctrl_config_misc(struct dp_catalog *dp_catalog,
					u32 colorimetry_cfg,
					u32 test_bits_depth)
{}

void dp_catalog_setup_peripheral_flush(struct dp_catalog *dp_catalog)
{}

void dp_catalog_ctrl_config_msa(struct dp_catalog *dp_catalog,
					u32 rate, u32 stream_rate_khz,
					bool is_ycbcr_420)
{}

int dp_catalog_ctrl_set_pattern_state_bit(struct dp_catalog *dp_catalog,
					u32 state_bit)
{}

/**
 * dp_catalog_hw_revision() - retrieve DP hw revision
 *
 * @dp_catalog: DP catalog structure
 *
 * Return: DP controller hw revision
 *
 */
u32 dp_catalog_hw_revision(const struct dp_catalog *dp_catalog)
{}

/**
 * dp_catalog_ctrl_reset() - reset DP controller
 *
 * @dp_catalog: DP catalog structure
 *
 * return: void
 *
 * This function reset the DP controller
 *
 * NOTE: reset DP controller will also clear any pending HPD related interrupts
 * 
 */
void dp_catalog_ctrl_reset(struct dp_catalog *dp_catalog)
{}

bool dp_catalog_ctrl_mainlink_ready(struct dp_catalog *dp_catalog)
{}

void dp_catalog_ctrl_enable_irq(struct dp_catalog *dp_catalog,
						bool enable)
{}

void dp_catalog_hpd_config_intr(struct dp_catalog *dp_catalog,
			u32 intr_mask, bool en)
{}

void dp_catalog_ctrl_hpd_enable(struct dp_catalog *dp_catalog)
{}

void dp_catalog_ctrl_hpd_disable(struct dp_catalog *dp_catalog)
{}

static void dp_catalog_enable_sdp(struct dp_catalog_private *catalog)
{}

void dp_catalog_ctrl_config_psr(struct dp_catalog *dp_catalog)
{}

void dp_catalog_ctrl_set_psr(struct dp_catalog *dp_catalog, bool enter)
{}

u32 dp_catalog_link_is_connected(struct dp_catalog *dp_catalog)
{}

u32 dp_catalog_hpd_get_intr_status(struct dp_catalog *dp_catalog)
{}

u32 dp_catalog_ctrl_read_psr_interrupt_status(struct dp_catalog *dp_catalog)
{}

int dp_catalog_ctrl_get_interrupt(struct dp_catalog *dp_catalog)
{}

void dp_catalog_ctrl_phy_reset(struct dp_catalog *dp_catalog)
{}

void dp_catalog_ctrl_send_phy_pattern(struct dp_catalog *dp_catalog,
			u32 pattern)
{}

u32 dp_catalog_ctrl_read_phy_pattern(struct dp_catalog *dp_catalog)
{}

/* panel related catalog functions */
int dp_catalog_panel_timing_cfg(struct dp_catalog *dp_catalog, u32 total,
				u32 sync_start, u32 width_blanking, u32 dp_active)
{}

static void dp_catalog_panel_send_vsc_sdp(struct dp_catalog *dp_catalog, struct dp_sdp *vsc_sdp)
{}

static void dp_catalog_panel_update_sdp(struct dp_catalog *dp_catalog)
{}

void dp_catalog_panel_enable_vsc_sdp(struct dp_catalog *dp_catalog, struct dp_sdp *vsc_sdp)
{}

void dp_catalog_panel_disable_vsc_sdp(struct dp_catalog *dp_catalog)
{}

void dp_catalog_panel_tpg_enable(struct dp_catalog *dp_catalog,
				struct drm_display_mode *drm_mode)
{}

void dp_catalog_panel_tpg_disable(struct dp_catalog *dp_catalog)
{}

static void __iomem *dp_ioremap(struct platform_device *pdev, int idx, size_t *len)
{}

static int dp_catalog_get_io(struct dp_catalog_private *catalog)
{}

struct dp_catalog *dp_catalog_get(struct device *dev)
{}

u32 dp_catalog_audio_get_header(struct dp_catalog *dp_catalog,
				enum dp_catalog_audio_sdp_type sdp,
				enum dp_catalog_audio_header_type header)
{}

void dp_catalog_audio_set_header(struct dp_catalog *dp_catalog,
				 enum dp_catalog_audio_sdp_type sdp,
				 enum dp_catalog_audio_header_type header,
				 u32 data)
{}

void dp_catalog_audio_config_acr(struct dp_catalog *dp_catalog, u32 select)
{}

void dp_catalog_audio_enable(struct dp_catalog *dp_catalog, bool enable)
{}

void dp_catalog_audio_config_sdp(struct dp_catalog *dp_catalog)
{}

void dp_catalog_audio_init(struct dp_catalog *dp_catalog)
{}

void dp_catalog_audio_sfe_level(struct dp_catalog *dp_catalog, u32 safe_to_exit_level)
{}