Commit 7da45e74 authored by Rodrigo Siqueira's avatar Rodrigo Siqueira Committed by Alex Deucher
Browse files

drm/amd/display: Clean up code in DC



This commit removes some unnecessary code and makes the required
adjustments to replace other parts of the code with a short option.

Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2a8f7464
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -248,13 +248,13 @@ void dcn32_link_encoder_construct(
	enc10->base.hpd_source = init_data->hpd_source;
	enc10->base.connector = init_data->connector;

	if (enc10->base.connector.id == CONNECTOR_ID_USBC)
		enc10->base.features.flags.bits.DP_IS_USB_C = 1;

	enc10->base.preferred_engine = ENGINE_ID_UNKNOWN;

	enc10->base.features = *enc_features;

	if (enc10->base.connector.id == CONNECTOR_ID_USBC)
		enc10->base.features.flags.bits.DP_IS_USB_C = 1;

	enc10->base.transmitter = init_data->transmitter;

	/* set the flag to indicate whether driver poll the I2C data pin
+1 −9
Original line number Diff line number Diff line
@@ -26,15 +26,7 @@
#ifndef __DC_LINK_ENCODER__DCN32_H__
#define __DC_LINK_ENCODER__DCN32_H__

#include "dcn31/dcn31_dio_link_encoder.h"

#define LE_DCN32_REG_LIST(id)\
	LE_DCN31_REG_LIST(id),\
	SRI(DIG_FIFO_CTRL0, DIG, id)

#define LINK_ENCODER_MASK_SH_LIST_DCN32(mask_sh) \
	LINK_ENCODER_MASK_SH_LIST_DCN31(mask_sh),\
	LE_SF(DIG0_DIG_FIFO_CTRL0, DIG_FIFO_OUTPUT_PIXEL_MODE, mask_sh)
#include "dcn30/dcn30_dio_link_encoder.h"

void dcn32_link_encoder_construct(
	struct dcn20_link_encoder *enc20,
+0 −5
Original line number Diff line number Diff line
@@ -127,11 +127,6 @@ void dcn321_link_encoder_construct(
	 * while doing the DP sink detect
	 */

/*	if (dal_adapter_service_is_feature_supported(as,
		FEATURE_DP_SINK_DETECT_POLL_DATA_PIN))
		enc10->base.features.flags.bits.
			DP_SINK_DETECT_POLL_DATA_PIN = true;*/

	enc10->base.output_signals =
		SIGNAL_TYPE_DVI_SINGLE_LINK |
		SIGNAL_TYPE_DVI_DUAL_LINK |
+1 −2
Original line number Diff line number Diff line
@@ -163,12 +163,11 @@ struct link_encoder_funcs {

	enum signal_type (*get_dig_mode)(
		struct link_encoder *enc);

	void (*set_dio_phy_mux)(
		struct link_encoder *enc,
		enum encoder_type_select sel,
		uint32_t hpo_inst);
	void (*set_dig_output_mode)(
			struct link_encoder *enc, uint8_t pix_per_container);
};

/*
+5 −6
Original line number Diff line number Diff line
@@ -62,6 +62,9 @@
#include "dcn20/dcn20_vmid.h"
#include "dce/dce_panel_cntl.h"

#include "dcn20/dcn20_dwb.h"
#include "dcn20/dcn20_mmhubbub.h"

#include "navi10_ip_offset.h"

#include "dcn/dcn_2_0_0_offset.h"
@@ -71,9 +74,6 @@

#include "nbio/nbio_2_3_offset.h"

#include "dcn20/dcn20_dwb.h"
#include "dcn20/dcn20_mmhubbub.h"

#include "mmhub/mmhub_2_0_0_offset.h"
#include "mmhub/mmhub_2_0_0_sh_mask.h"

@@ -83,11 +83,10 @@
#include "dce/dce_aux.h"
#include "dce/dce_i2c.h"
#include "vm_helper.h"
#include "link_enc_cfg.h"

#include "amdgpu_socbb.h"

#include "link_enc_cfg.h"
#include "link.h"

#define DC_LOGGER_INIT(logger)

#ifndef mmDP0_DP_DPHY_INTERNAL_CTRL