linux/drivers/gpu/drm/radeon/atombios_dp.c

/*
 * Copyright 2007-8 Advanced Micro Devices, Inc.
 * Copyright 2008 Red Hat Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Dave Airlie
 *          Alex Deucher
 *          Jerome Glisse
 */

#include <drm/radeon_drm.h>
#include "radeon.h"

#include "atom.h"
#include "atom-bits.h"
#include <drm/display/drm_dp_helper.h>

/* move these to drm_dp_helper.c/h */
#define DP_LINK_CONFIGURATION_SIZE
#define DP_DPCD_SIZE

static char *voltage_names[] =;
static char *pre_emph_names[] =;

/***** radeon AUX functions *****/

/* Atom needs data in little endian format so swap as appropriate when copying
 * data to or from atom. Note that atom operates on dw units.
 *
 * Use to_le=true when sending data to atom and provide at least
 * ALIGN(num_bytes,4) bytes in the dst buffer.
 *
 * Use to_le=false when receiving data from atom and provide ALIGN(num_bytes,4)
 * byes in the src buffer.
 */
void radeon_atom_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le)
{}

aux_channel_transaction;

static int radeon_process_aux_ch(struct radeon_i2c_chan *chan,
				 u8 *send, int send_bytes,
				 u8 *recv, int recv_size,
				 u8 delay, u8 *ack)
{}

#define BARE_ADDRESS_SIZE
#define HEADER_SIZE

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

void radeon_dp_aux_init(struct radeon_connector *radeon_connector)
{}

/***** general DP utility functions *****/

#define DP_VOLTAGE_MAX
#define DP_PRE_EMPHASIS_MAX

static void dp_get_adjust_train(const u8 link_status[DP_LINK_STATUS_SIZE],
				int lane_count,
				u8 train_set[4])
{}

/* convert bits per color to bits per pixel */
/* get bpc from the EDID */
static int convert_bpc_to_bpp(int bpc)
{}

/***** radeon specific DP functions *****/

static int radeon_dp_get_dp_link_config(struct drm_connector *connector,
					const u8 dpcd[DP_DPCD_SIZE],
					unsigned pix_clock,
					unsigned *dp_lanes, unsigned *dp_rate)
{}

static u8 radeon_dp_encoder_service(struct radeon_device *rdev,
				    int action, int dp_clock,
				    u8 ucconfig, u8 lane_num)
{}

u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector)
{}

static void radeon_dp_probe_oui(struct radeon_connector *radeon_connector)
{}

bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector)
{}

int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
			     struct drm_connector *connector)
{}

void radeon_dp_set_link_config(struct drm_connector *connector,
			       const struct drm_display_mode *mode)
{}

int radeon_dp_mode_valid_helper(struct drm_connector *connector,
				struct drm_display_mode *mode)
{}

bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector)
{}

void radeon_dp_set_rx_power_state(struct drm_connector *connector,
				  u8 power_state)
{}


struct radeon_dp_link_train_info {};

static void radeon_dp_update_vs_emph(struct radeon_dp_link_train_info *dp_info)
{}

static void radeon_dp_set_tp(struct radeon_dp_link_train_info *dp_info, int tp)
{}

static int radeon_dp_link_train_init(struct radeon_dp_link_train_info *dp_info)
{}

static int radeon_dp_link_train_finish(struct radeon_dp_link_train_info *dp_info)
{}

static int radeon_dp_link_train_cr(struct radeon_dp_link_train_info *dp_info)
{}

static int radeon_dp_link_train_ce(struct radeon_dp_link_train_info *dp_info)
{}

void radeon_dp_link_train(struct drm_encoder *encoder,
			  struct drm_connector *connector)
{}