linux/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Analogix DP (Display Port) core interface driver.
*
* Copyright (C) 2012 Samsung Electronics Co., Ltd.
* Author: Jingoo Han <[email protected]>
*/

#include <linux/clk.h>
#include <linux/component.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>

#include <drm/bridge/analogix_dp.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_crtc.h>
#include <drm/drm_device.h>
#include <drm/drm_edid.h>
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>

#include "analogix_dp_core.h"
#include "analogix_dp_reg.h"

#define to_dp(nm)

static const bool verify_fast_training;

struct bridge_init {};

static void analogix_dp_init_dp(struct analogix_dp_device *dp)
{}

static int analogix_dp_detect_hpd(struct analogix_dp_device *dp)
{}

static bool analogix_dp_detect_sink_psr(struct analogix_dp_device *dp)
{}

static int analogix_dp_enable_sink_psr(struct analogix_dp_device *dp)
{}

static int
analogix_dp_enable_rx_to_enhanced_mode(struct analogix_dp_device *dp,
				       bool enable)
{}

static int analogix_dp_is_enhanced_mode_available(struct analogix_dp_device *dp,
						  u8 *enhanced_mode_support)
{}

static int analogix_dp_set_enhanced_mode(struct analogix_dp_device *dp)
{}

static int analogix_dp_training_pattern_dis(struct analogix_dp_device *dp)
{}

static int analogix_dp_link_start(struct analogix_dp_device *dp)
{}

static unsigned char analogix_dp_get_lane_status(u8 link_status[2], int lane)
{}

static int analogix_dp_clock_recovery_ok(u8 link_status[2], int lane_count)
{}

static int analogix_dp_channel_eq_ok(u8 link_status[2], u8 link_align,
				     int lane_count)
{}

static unsigned char
analogix_dp_get_adjust_request_voltage(u8 adjust_request[2], int lane)
{}

static unsigned char analogix_dp_get_adjust_request_pre_emphasis(
					u8 adjust_request[2],
					int lane)
{}

static void analogix_dp_reduce_link_rate(struct analogix_dp_device *dp)
{}

static void analogix_dp_get_adjust_training_lane(struct analogix_dp_device *dp,
						 u8 adjust_request[2])
{}

static int analogix_dp_process_clock_recovery(struct analogix_dp_device *dp)
{}

static int analogix_dp_process_equalizer_training(struct analogix_dp_device *dp)
{}

static void analogix_dp_get_max_rx_bandwidth(struct analogix_dp_device *dp,
					     u8 *bandwidth)
{}

static void analogix_dp_get_max_rx_lane_count(struct analogix_dp_device *dp,
					      u8 *lane_count)
{}

static int analogix_dp_full_link_train(struct analogix_dp_device *dp,
				       u32 max_lanes, u32 max_rate)
{}

static int analogix_dp_fast_link_train(struct analogix_dp_device *dp)
{}

static int analogix_dp_train_link(struct analogix_dp_device *dp)
{}

static int analogix_dp_config_video(struct analogix_dp_device *dp)
{}

static int analogix_dp_enable_scramble(struct analogix_dp_device *dp,
				       bool enable)
{}

static irqreturn_t analogix_dp_hardirq(int irq, void *arg)
{}

static irqreturn_t analogix_dp_irq_thread(int irq, void *arg)
{}

static int analogix_dp_fast_link_train_detection(struct analogix_dp_device *dp)
{}

static int analogix_dp_commit(struct analogix_dp_device *dp)
{}

static int analogix_dp_enable_psr(struct analogix_dp_device *dp)
{}

static int analogix_dp_disable_psr(struct analogix_dp_device *dp)
{}

/*
 * This function is a bit of a catch-all for panel preparation, hopefully
 * simplifying the logic of functions that need to prepare/unprepare the panel
 * below.
 *
 * If @prepare is true, this function will prepare the panel. Conversely, if it
 * is false, the panel will be unprepared.
 *
 * If @is_modeset_prepare is true, the function will disregard the current state
 * of the panel and either prepare/unprepare the panel based on @prepare. Once
 * it finishes, it will update dp->panel_is_modeset to reflect the current state
 * of the panel.
 */
static int analogix_dp_prepare_panel(struct analogix_dp_device *dp,
				     bool prepare, bool is_modeset_prepare)
{}

static int analogix_dp_get_modes(struct drm_connector *connector)
{}

static struct drm_encoder *
analogix_dp_best_encoder(struct drm_connector *connector)
{}


static int analogix_dp_atomic_check(struct drm_connector *connector,
				    struct drm_atomic_state *state)
{}

static const struct drm_connector_helper_funcs analogix_dp_connector_helper_funcs =;

static enum drm_connector_status
analogix_dp_detect(struct drm_connector *connector, bool force)
{}

static const struct drm_connector_funcs analogix_dp_connector_funcs =;

static int analogix_dp_bridge_attach(struct drm_bridge *bridge,
				     enum drm_bridge_attach_flags flags)
{}

static
struct drm_crtc *analogix_dp_get_old_crtc(struct analogix_dp_device *dp,
					  struct drm_atomic_state *state)
{}

static
struct drm_crtc *analogix_dp_get_new_crtc(struct analogix_dp_device *dp,
					  struct drm_atomic_state *state)
{}

static void
analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge,
				     struct drm_bridge_state *old_bridge_state)
{}

static int analogix_dp_set_bridge(struct analogix_dp_device *dp)
{}

static void
analogix_dp_bridge_atomic_enable(struct drm_bridge *bridge,
				 struct drm_bridge_state *old_bridge_state)
{}

static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
{}

static void
analogix_dp_bridge_atomic_disable(struct drm_bridge *bridge,
				  struct drm_bridge_state *old_bridge_state)
{}

static void
analogix_dp_bridge_atomic_post_disable(struct drm_bridge *bridge,
				struct drm_bridge_state *old_bridge_state)
{}

static void analogix_dp_bridge_mode_set(struct drm_bridge *bridge,
				const struct drm_display_mode *orig_mode,
				const struct drm_display_mode *mode)
{}

static const struct drm_bridge_funcs analogix_dp_bridge_funcs =;

static int analogix_dp_create_bridge(struct drm_device *drm_dev,
				     struct analogix_dp_device *dp)
{}

static int analogix_dp_dt_parse_pdata(struct analogix_dp_device *dp)
{}

static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux,
				       struct drm_dp_aux_msg *msg)
{}

struct analogix_dp_device *
analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
{}
EXPORT_SYMBOL_GPL();

int analogix_dp_suspend(struct analogix_dp_device *dp)
{}
EXPORT_SYMBOL_GPL();

int analogix_dp_resume(struct analogix_dp_device *dp)
{}
EXPORT_SYMBOL_GPL();

int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev)
{}
EXPORT_SYMBOL_GPL();

void analogix_dp_unbind(struct analogix_dp_device *dp)
{}
EXPORT_SYMBOL_GPL();

int analogix_dp_start_crc(struct drm_connector *connector)
{}
EXPORT_SYMBOL_GPL();

int analogix_dp_stop_crc(struct drm_connector *connector)
{}
EXPORT_SYMBOL_GPL();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();