linux/drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c

/*
 * Copyright 2012-15 Advanced Micro Devices, 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: AMD
 *
 */

/* FILE POLICY AND INTENDED USAGE:
 *
 * This file implements generic display communication protocols such as i2c, aux
 * and scdc. The file should not contain any specific applications of these
 * protocols such as display capability query, detection, or handshaking such as
 * link training.
 */
#include "link_ddc.h"
#include "vector.h"
#include "dce/dce_aux.h"
#include "dal_asic_id.h"
#include "link_dpcd.h"
#include "dm_helpers.h"
#include "atomfirmware.h"

#define DC_LOGGER
#define DC_LOGGER_INIT(logger)

static const uint8_t DP_VGA_DONGLE_BRANCH_DEV_NAME[] =;
/* DP to Dual link DVI converter */
static const uint8_t DP_DVI_CONVERTER_ID_4[] =;
static const uint8_t DP_DVI_CONVERTER_ID_5[] =;

struct i2c_payloads {};

static bool i2c_payloads_create(
		struct dc_context *ctx,
		struct i2c_payloads *payloads,
		uint32_t count)
{}

static struct i2c_payload *i2c_payloads_get(struct i2c_payloads *p)
{}

static uint32_t i2c_payloads_get_count(struct i2c_payloads *p)
{}

static void i2c_payloads_destroy(struct i2c_payloads *p)
{}

#define DDC_MIN(a, b)

static void i2c_payloads_add(
	struct i2c_payloads *payloads,
	uint32_t address,
	uint32_t len,
	uint8_t *data,
	bool write)
{}

static void ddc_service_construct(
	struct ddc_service *ddc_service,
	struct ddc_service_init_data *init_data)
{}

struct ddc_service *link_create_ddc_service(
	struct ddc_service_init_data *init_data)
{}

static void ddc_service_destruct(struct ddc_service *ddc)
{}

void link_destroy_ddc_service(struct ddc_service **ddc)
{}

void set_ddc_transaction_type(
	struct ddc_service *ddc,
	enum ddc_transaction_type type)
{}

bool link_is_in_aux_transaction_mode(struct ddc_service *ddc)
{}

void set_dongle_type(struct ddc_service *ddc,
		enum display_dongle_type dongle_type)
{}

static uint32_t defer_delay_converter_wa(
	struct ddc_service *ddc,
	uint32_t defer_delay)
{}

#define DP_TRANSLATOR_DELAY

uint32_t link_get_aux_defer_delay(struct ddc_service *ddc)
{}

static bool submit_aux_command(struct ddc_service *ddc,
		struct aux_payload *payload)
{}

bool link_query_ddc_data(
	struct ddc_service *ddc,
	uint32_t address,
	uint8_t *write_buf,
	uint32_t write_size,
	uint8_t *read_buf,
	uint32_t read_size)
{}

int link_aux_transfer_raw(struct ddc_service *ddc,
		struct aux_payload *payload,
		enum aux_return_code_type *operation_result)
{}

uint32_t link_get_fixed_vs_pe_retimer_write_address(struct dc_link *link)
{}

uint32_t link_get_fixed_vs_pe_retimer_read_address(struct dc_link *link)
{}

bool link_configure_fixed_vs_pe_retimer(struct ddc_service *ddc, const uint8_t *data, uint32_t length)
{}

bool link_query_fixed_vs_pe_retimer(struct ddc_service *ddc, uint8_t *data, uint32_t length)
{}

bool link_aux_transfer_with_retries_no_mutex(struct ddc_service *ddc,
		struct aux_payload *payload)
{}


bool try_to_configure_aux_timeout(struct ddc_service *ddc,
		uint32_t timeout)
{}

struct ddc *get_ddc_pin(struct ddc_service *ddc_service)
{}

void write_scdc_data(struct ddc_service *ddc_service,
		uint32_t pix_clk,
		bool lte_340_scramble)
{}

void read_scdc_data(struct ddc_service *ddc_service)
{}