linux/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.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
 *
 */

#include "dc_bios_types.h"
#include "dce_stream_encoder.h"
#include "reg_helper.h"
#include "hw_shared.h"

#define DC_LOGGER

#define REG(reg)

#undef FN
#define FN(reg_name, field_name)

#define VBI_LINE_0
#define DP_BLANK_MAX_RETRY
#define HDMI_CLOCK_CHANNEL_RATE_MORE_340M

#ifndef TMDS_CNTL__TMDS_PIXEL_ENCODING_MASK
	#define TMDS_CNTL__TMDS_PIXEL_ENCODING_MASK
	#define TMDS_CNTL__TMDS_COLOR_FORMAT_MASK
	#define TMDS_CNTL__TMDS_PIXEL_ENCODING__SHIFT
	#define TMDS_CNTL__TMDS_COLOR_FORMAT__SHIFT
#endif

enum {};

#define DCE110_SE(audio)

#define CTX

static void dce110_update_generic_info_packet(
	struct dce110_stream_encoder *enc110,
	uint32_t packet_index,
	const struct dc_info_packet *info_packet)
{}

static void dce110_update_hdmi_info_packet(
	struct dce110_stream_encoder *enc110,
	uint32_t packet_index,
	const struct dc_info_packet *info_packet)
{}

/* setup stream encoder in dp mode */
static void dce110_stream_encoder_dp_set_stream_attribute(
	struct stream_encoder *enc,
	struct dc_crtc_timing *crtc_timing,
	enum dc_color_space output_color_space,
	bool use_vsc_sdp_for_colorimetry,
	uint32_t enable_sdp_splitting)
{}

static void dce110_stream_encoder_set_stream_attribute_helper(
		struct dce110_stream_encoder *enc110,
		struct dc_crtc_timing *crtc_timing)
{}

/* setup stream encoder in hdmi mode */
static void dce110_stream_encoder_hdmi_set_stream_attribute(
	struct stream_encoder *enc,
	struct dc_crtc_timing *crtc_timing,
	int actual_pix_clk_khz,
	bool enable_audio)
{}

/* setup stream encoder in dvi mode */
static void dce110_stream_encoder_dvi_set_stream_attribute(
	struct stream_encoder *enc,
	struct dc_crtc_timing *crtc_timing,
	bool is_dual_link)
{}

/* setup stream encoder in LVDS mode */
static void dce110_stream_encoder_lvds_set_stream_attribute(
	struct stream_encoder *enc,
	struct dc_crtc_timing *crtc_timing)
{}

static void dce110_stream_encoder_set_throttled_vcp_size(
	struct stream_encoder *enc,
	struct fixed31_32 avg_time_slots_per_mtp)
{}

static void dce110_stream_encoder_update_hdmi_info_packets(
	struct stream_encoder *enc,
	const struct encoder_info_frame *info_frame)
{}

static void dce110_stream_encoder_stop_hdmi_info_packets(
	struct stream_encoder *enc)
{}

static void dce110_stream_encoder_update_dp_info_packets(
	struct stream_encoder *enc,
	const struct encoder_info_frame *info_frame)
{}

static void dce110_stream_encoder_stop_dp_info_packets(
	struct stream_encoder *enc)
{}

static void dce110_stream_encoder_dp_blank(
	struct dc_link *link,
	struct stream_encoder *enc)
{}

/* output video stream to link encoder */
static void dce110_stream_encoder_dp_unblank(
	struct dc_link *link,
	struct stream_encoder *enc,
	const struct encoder_unblank_param *param)
{}

static void dce110_stream_encoder_set_avmute(
	struct stream_encoder *enc,
	bool enable)
{}


static void dce110_reset_hdmi_stream_attribute(
	struct stream_encoder *enc)
{}

#define DP_SEC_AUD_N__DP_SEC_AUD_N__DEFAULT
#define DP_SEC_TIMESTAMP__DP_SEC_TIMESTAMP_MODE__AUTO_CALC

#include "include/audio_types.h"


/* 25.2MHz/1.001*/
/* 25.2MHz/1.001*/
/* 25.2MHz*/
/* 27MHz */
/* 27MHz*1.001*/
/* 27MHz*1.001*/
/* 54MHz*/
/* 54MHz*1.001*/
/* 74.25MHz/1.001*/
/* 74.25MHz*/
/* 148.5MHz/1.001*/
/* 148.5MHz*/

static const struct audio_clock_info audio_clock_info_table[16] =;

static const struct audio_clock_info audio_clock_info_table_36bpc[14] =;

static const struct audio_clock_info audio_clock_info_table_48bpc[14] =;

static union audio_cea_channels speakers_to_channels(
	struct audio_speaker_flags speaker_flags)
{}

static uint32_t calc_max_audio_packets_per_line(
	const struct audio_crtc_info *crtc_info)
{}

static void get_audio_clock_info(
	enum dc_color_depth color_depth,
	uint32_t crtc_pixel_clock_100Hz,
	uint32_t actual_pixel_clock_100Hz,
	struct audio_clock_info *audio_clock_info)
{}

static void dce110_se_audio_setup(
	struct stream_encoder *enc,
	unsigned int az_inst,
	struct audio_info *audio_info)
{}

static void dce110_se_setup_hdmi_audio(
	struct stream_encoder *enc,
	const struct audio_crtc_info *crtc_info)
{}

static void dce110_se_setup_dp_audio(
	struct stream_encoder *enc)
{}

static void dce110_se_enable_audio_clock(
	struct stream_encoder *enc,
	bool enable)
{}

static void dce110_se_enable_dp_audio(
	struct stream_encoder *enc)
{}

static void dce110_se_disable_dp_audio(
	struct stream_encoder *enc)
{}

void dce110_se_audio_mute_control(
	struct stream_encoder *enc,
	bool mute)
{}

void dce110_se_dp_audio_setup(
	struct stream_encoder *enc,
	unsigned int az_inst,
	struct audio_info *info)
{}

void dce110_se_dp_audio_enable(
	struct stream_encoder *enc)
{}

void dce110_se_dp_audio_disable(
	struct stream_encoder *enc)
{}

void dce110_se_hdmi_audio_setup(
	struct stream_encoder *enc,
	unsigned int az_inst,
	struct audio_info *info,
	struct audio_crtc_info *audio_crtc_info)
{}

void dce110_se_hdmi_audio_disable(
	struct stream_encoder *enc)
{}


static void setup_stereo_sync(
	struct stream_encoder *enc,
	int tg_inst, bool enable)
{}

static void dig_connect_to_otg(
	struct stream_encoder *enc,
	int tg_inst)
{}

static unsigned int dig_source_otg(
	struct stream_encoder *enc)
{}

static const struct stream_encoder_funcs dce110_str_enc_funcs =;

void dce110_stream_encoder_construct(
	struct dce110_stream_encoder *enc110,
	struct dc_context *ctx,
	struct dc_bios *bp,
	enum engine_id eng_id,
	const struct dce110_stream_enc_registers *regs,
	const struct dce_stream_encoder_shift *se_shift,
	const struct dce_stream_encoder_mask *se_mask)
{}