[PATCH 52/76] drm/amd/dal: remove adapter_service and asic_capability

Harry Wentland harry.wentland at amd.com
Mon Nov 21 23:01:12 UTC 2016


From: Tony Cheng <tony.cheng at amd.com>

Yay!!!!

Signed-off-by: Tony Cheng <tony.cheng at amd.com>
Acked-by: Harry Wentland <harry.wentland at amd.com>
---
 drivers/gpu/drm/amd/dal/dc/Makefile                |   2 +-
 drivers/gpu/drm/amd/dal/dc/adapter/Makefile        |  10 -
 .../gpu/drm/amd/dal/dc/adapter/adapter_service.c   | 625 ---------------------
 .../gpu/drm/amd/dal/dc/adapter/adapter_service.h   |  34 --
 .../gpu/drm/amd/dal/dc/asic_capability/Makefile    |  50 --
 .../amd/dal/dc/asic_capability/asic_capability.c   | 181 ------
 .../dc/asic_capability/carrizo_asic_capability.c   | 133 -----
 .../dc/asic_capability/carrizo_asic_capability.h   |  36 --
 .../dc/asic_capability/hawaii_asic_capability.c    | 132 -----
 .../dc/asic_capability/hawaii_asic_capability.h    |  37 --
 .../dc/asic_capability/polaris10_asic_capability.c | 125 -----
 .../dc/asic_capability/polaris10_asic_capability.h |  36 --
 .../dal/dc/asic_capability/tonga_asic_capability.c | 132 -----
 .../dal/dc/asic_capability/tonga_asic_capability.h |  18 -
 drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c      |   2 -
 drivers/gpu/drm/amd/dal/dc/core/dc.c               |  48 --
 drivers/gpu/drm/amd/dal/dc/core/dc_link.c          |   5 -
 drivers/gpu/drm/amd/dal/dc/core/dc_link_ddc.c      |   3 -
 drivers/gpu/drm/amd/dal/dc/dc_types.h              |   1 -
 drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.c  |   3 -
 20 files changed, 1 insertion(+), 1612 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/adapter/Makefile
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.h
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/Makefile
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/asic_capability.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/carrizo_asic_capability.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/carrizo_asic_capability.h
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/hawaii_asic_capability.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/hawaii_asic_capability.h
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/polaris10_asic_capability.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/polaris10_asic_capability.h
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/tonga_asic_capability.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/asic_capability/tonga_asic_capability.h

diff --git a/drivers/gpu/drm/amd/dal/dc/Makefile b/drivers/gpu/drm/amd/dal/dc/Makefile
index f1a60322dce6..834bb1814be5 100644
--- a/drivers/gpu/drm/amd/dal/dc/Makefile
+++ b/drivers/gpu/drm/amd/dal/dc/Makefile
@@ -2,7 +2,7 @@
 # Makefile for Display Core (dc) component.
 #
 
-DC_LIBS = adapter asic_capability basics bios calcs dce \
+DC_LIBS = basics bios calcs dce \
 gpio gpu i2caux irq virtual
 
 DC_LIBS += dce112
diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/Makefile b/drivers/gpu/drm/amd/dal/dc/adapter/Makefile
deleted file mode 100644
index 3297656bf948..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/adapter/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile for the 'adapter' sub-component of DAL.
-# It provides the control and status of HW adapter.
-
-ADAPTER = adapter_service.o
-
-AMD_DAL_ADAPTER = $(addprefix $(AMDDALPATH)/dc/adapter/,$(ADAPTER))
-
-AMD_DAL_FILES += $(AMD_DAL_ADAPTER)
-
diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
deleted file mode 100644
index b91301561b7f..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
+++ /dev/null
@@ -1,625 +0,0 @@
-/*
- * 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 "dm_services.h"
-
-#include "dc_bios_types.h"
-
-#include "include/adapter_service_interface.h"
-#include "include/i2caux_interface.h"
-#include "include/asic_capability_types.h"
-#include "include/gpio_service_interface.h"
-#include "include/asic_capability_interface.h"
-#include "include/logger_interface.h"
-
-#include "adapter_service.h"
-
-#include "atom.h"
-
-#define ABSOLUTE_BACKLIGHT_MAX 255
-#define DEFAULT_MIN_BACKLIGHT 12
-#define DEFAULT_MAX_BACKLIGHT 255
-#define BACKLIGHT_CURVE_COEFFB 100
-#define BACKLIGHT_CURVE_COEFFA_FACTOR 10000
-#define BACKLIGHT_CURVE_COEFFB_FACTOR 100
-
-/*
- * Adapter service feature entry table.
- *
- * This is an array of features that is used to generate feature set. Each
- * entry consists three element:
- *
- * Feature name, default value, and if this feature is a boolean type. A
- * feature can only be a boolean or int type.
- *
- * Example 1: a boolean type feature
- * FEATURE_ENABLE_HW_EDID_POLLING, false, true
- *
- * First element is feature name: EATURE_ENABLE_HW_EDID_POLLING, it has a
- * default value 0, and it is a boolean feature.
- *
- * Example 2: an int type feature
- * FEATURE_DCP_PROGRAMMING_WA, 0x1FF7, false
- *
- * In this case, the default value is 0x1FF7 and not a boolean type, which
- * makes it an int type.
- */
-/* Type of feature with its runtime parameter and default value */
-struct feature_source_entry {
-	enum adapter_feature_id feature_id;
-	uint32_t default_value;
-	bool is_boolean_type;
-};
-
-static const struct feature_source_entry feature_entry_table[] = {
-	/* Feature name | default value | is boolean type */
-	{FEATURE_ENABLE_HW_EDID_POLLING, false, true},
-	{FEATURE_DP_SINK_DETECT_POLL_DATA_PIN, false, true},
-	{FEATURE_UNDERFLOW_INTERRUPT, false, true},
-	{FEATURE_ALLOW_WATERMARK_ADJUSTMENT, false, true},
-	{FEATURE_DCP_DITHER_FRAME_RANDOM_ENABLE, false, true},
-	{FEATURE_DCP_DITHER_RGB_RANDOM_ENABLE, false, true},
-	{FEATURE_DCP_DITHER_HIGH_PASS_RANDOM_ENABLE, false, true},
-	{FEATURE_LINE_BUFFER_ENHANCED_PIXEL_DEPTH, false, true},
-	{FEATURE_MAXIMIZE_URGENCY_WATERMARKS, false, true},
-	{FEATURE_MAXIMIZE_STUTTER_MARKS, false, true},
-	{FEATURE_MAXIMIZE_NBP_MARKS, false, true},
-	{FEATURE_ALLOW_EDP_RESOURCE_SHARING, false, true},
-	{FEATURE_SUPPORT_DP_YUV, false, true},
-	{FEATURE_SUPPORT_DP_Y_ONLY, false, true},
-	{FEATURE_MODIFY_TIMINGS_FOR_WIRELESS, false, true},
-	{FEATURE_DCP_BIT_DEPTH_REDUCTION_MODE, 0, false},
-	{FEATURE_DCP_DITHER_MODE, 0, false},
-	{FEATURE_DCP_PROGRAMMING_WA, 0, false},
-	{FEATURE_WIRELESS_FULL_TIMING_ADJUSTMENT, false, true},
-	{FEATURE_WIRELESS_LIMIT_720P, false, true},
-	{FEATURE_MODIFY_TIMINGS_FOR_WIRELESS, false, true},
-	{FEATURE_DETECT_REQUIRE_HPD_HIGH, false, true},
-	{FEATURE_LB_HIGH_RESOLUTION, false, true},
-	{FEATURE_MAX_CONTROLLER_NUM, 0, false},
-	{FEATURE_DRR_SUPPORT, AS_DRR_SUPPORT_ENABLED, false},
-	{FEATURE_DP_DISPLAY_FORCE_SS_ENABLE, false, true},
-	{FEATURE_REPORT_CE_MODE_ONLY, false, true},
-	{FEATURE_ALLOW_OPTIMIZED_MODE_AS_DEFAULT, false, true},
-	{FEATURE_FORCE_TIMING_RESYNC, false, true},
-	{FEATURE_TMDS_DISABLE_DITHERING, false, true},
-	{FEATURE_HDMI_DISABLE_DITHERING, false, true},
-	{FEATURE_DP_DISABLE_DITHERING, false, true},
-	{FEATURE_EMBEDDED_DISABLE_DITHERING, true, true},
-	{FEATURE_ALLOW_SELF_REFRESH, false, true},
-	{FEATURE_ALLOW_DYNAMIC_PIXEL_ENCODING_CHANGE, false, true},
-	{FEATURE_ALLOW_HSYNC_VSYNC_ADJUSTMENT, false, true},
-	{FEATURE_FORCE_PSR, false, true},
-	{FEATURE_PSR_SETUP_TIME_TEST, 0, false},
-	{FEATURE_POWER_GATING_PIPE_IN_TILE, true, true},
-	{FEATURE_POWER_GATING_LB_PORTION, true, true},
-	{FEATURE_PREFER_3D_TIMING, false, true},
-	{FEATURE_VARI_BRIGHT_ENABLE, true, true},
-	{FEATURE_PSR_ENABLE, false, true},
-	{FEATURE_WIRELESS_ENABLE_COMPRESSED_AUDIO, false, true},
-	{FEATURE_WIRELESS_INCLUDE_UNVERIFIED_TIMINGS, true, true},
-	{FEATURE_DP_FRAME_PACK_STEREO3D, false, true},
-	{FEATURE_DISPLAY_PREFERRED_VIEW, 0, false},
-	{FEATURE_ALLOW_HDMI_WITHOUT_AUDIO, false, true},
-	{FEATURE_ABM_2_0, false, true},
-	{FEATURE_SUPPORT_MIRABILIS, false, true},
-	{FEATURE_OPTIMIZATION, 0xFFFF, false},
-	{FEATURE_PERF_MEASURE, 0, false},
-	{FEATURE_MIN_BACKLIGHT_LEVEL, 0, false},
-	{FEATURE_MAX_BACKLIGHT_LEVEL, 255, false},
-	{FEATURE_LOAD_DMCU_FIRMWARE, true, true},
-	{FEATURE_DISABLE_AZ_CLOCK_GATING, false, true},
-	{FEATURE_DONGLE_SINK_COUNT_CHECK, true, true},
-	{FEATURE_INSTANT_UP_SCALE_DOWN_SCALE, false, true},
-	{FEATURE_TILED_DISPLAY, false, true},
-	{FEATURE_PREFERRED_ABM_CONFIG_SET, 0, false},
-	{FEATURE_CHANGE_SW_I2C_SPEED, 50, false},
-	{FEATURE_CHANGE_HW_I2C_SPEED, 50, false},
-	{FEATURE_CHANGE_I2C_SPEED_CONTROL, false, true},
-	{FEATURE_DEFAULT_PSR_LEVEL, 0, false},
-	{FEATURE_MAX_CLOCK_SOURCE_NUM, 0, false},
-	{FEATURE_REPORT_SINGLE_SELECTED_TIMING, false, true},
-	{FEATURE_ALLOW_HDMI_HIGH_CLK_DP_DONGLE, true, true},
-	{FEATURE_SUPPORT_EXTERNAL_PANEL_DRR, false, true},
-	{FEATURE_LVDS_SAFE_PIXEL_CLOCK_RANGE, 0, false},
-	{FEATURE_ABM_CONFIG, 0, false},
-	{FEATURE_WIRELESS_ENABLE, false, true},
-	{FEATURE_ALLOW_DIRECT_MEMORY_ACCESS_TRIG, false, true},
-	{FEATURE_FORCE_STATIC_SCREEN_EVENT_TRIGGERS, 0, false},
-	{FEATURE_USE_PPLIB, true, true},
-	{FEATURE_DPMS_AUDIO_ENDPOINT_CONTROL, true, true},
-	{FEATURE_PIXEL_PERFECT_OUTPUT, false, true},
-	{FEATURE_8BPP_SUPPORTED, false, true},
-};
-
-enum {
-	LEGACY_MAX_NUM_OF_CONTROLLERS = 2,
-	DEFAULT_NUM_COFUNC_NON_DP_DISPLAYS = 2
-};
-
-/*
- * get_feature_entries_num
- *
- * Get number of feature entries
- */
-static inline uint32_t get_feature_entries_num(void)
-{
-	return ARRAY_SIZE(feature_entry_table);
-}
-
-static void get_platform_info_methods(
-		struct adapter_service *as)
-{
-	struct platform_info_params params;
-	uint32_t mask = 0;
-
-	params.data = &mask;
-	params.method = PM_GET_AVAILABLE_METHODS;
-
-	if (dm_get_platform_info(as->ctx, &params))
-		as->platform_methods_mask = mask;
-
-}
-
-static void initialize_backlight_caps(
-		struct adapter_service *as)
-{
-	struct firmware_info fw_info;
-	struct embedded_panel_info panel_info;
-	struct platform_info_ext_brightness_caps caps;
-	struct platform_info_params params;
-	bool custom_curve_present = false;
-	bool custom_min_max_present = false;
-	struct dc_bios *dcb = as->ctx->dc_bios;
-
-	if (!(PM_GET_EXTENDED_BRIGHNESS_CAPS & as->platform_methods_mask)) {
-			dm_logger_write(as->ctx->logger, LOG_BACKLIGHT,
-					"This method is not supported\n");
-			return;
-	}
-
-	if (dcb->funcs->get_firmware_info(dcb, &fw_info) != BP_RESULT_OK ||
-		dcb->funcs->get_embedded_panel_info(dcb, &panel_info) != BP_RESULT_OK)
-		return;
-
-	params.data = ∩︀
-	params.method = PM_GET_EXTENDED_BRIGHNESS_CAPS;
-
-	if (dm_get_platform_info(as->ctx, &params)) {
-		as->ac_level_percentage = caps.basic_caps.ac_level_percentage;
-		as->dc_level_percentage = caps.basic_caps.dc_level_percentage;
-		custom_curve_present = (caps.data_points_num > 0);
-		custom_min_max_present = true;
-	} else
-		return;
-	/* Choose minimum backlight level base on priority:
-	 * extended caps,VBIOS,default */
-	if (custom_min_max_present)
-		as->backlight_8bit_lut[0] = caps.min_input_signal;
-
-	else if (fw_info.min_allowed_bl_level > 0)
-		as->backlight_8bit_lut[0] = fw_info.min_allowed_bl_level;
-
-	else
-		as->backlight_8bit_lut[0] = DEFAULT_MIN_BACKLIGHT;
-
-	/* Choose maximum backlight level base on priority:
-	 * extended caps,default */
-	if (custom_min_max_present)
-		as->backlight_8bit_lut[100] = caps.max_input_signal;
-
-	else
-		as->backlight_8bit_lut[100] = DEFAULT_MAX_BACKLIGHT;
-
-	if (as->backlight_8bit_lut[100] > ABSOLUTE_BACKLIGHT_MAX)
-		as->backlight_8bit_lut[100] = ABSOLUTE_BACKLIGHT_MAX;
-
-	if (as->backlight_8bit_lut[0] > as->backlight_8bit_lut[100])
-		as->backlight_8bit_lut[0] = as->backlight_8bit_lut[100];
-
-	if (custom_curve_present) {
-		uint16_t index = 1;
-		uint16_t i;
-		uint16_t num_of_data_points = (caps.data_points_num <= 99 ?
-				caps.data_points_num : 99);
-		/* Filling translation table from data points -
-		 * between every two provided data points we
-		 * lineary interpolate missing values
-		 */
-		for (i = 0 ; i < num_of_data_points; i++) {
-			uint16_t luminance = caps.data_points[i].luminance;
-			uint16_t signal_level =
-					caps.data_points[i].signal_level;
-
-			if (signal_level < as->backlight_8bit_lut[0])
-				signal_level = as->backlight_8bit_lut[0];
-
-			if (signal_level > as->backlight_8bit_lut[100])
-				signal_level = as->backlight_8bit_lut[100];
-
-			/* Lineary interpolate missing values */
-			if (index < luminance) {
-				uint16_t base_value =
-						as->backlight_8bit_lut[index-1];
-				uint16_t delta_signal =
-						signal_level - base_value;
-				uint16_t delta_luma = luminance - index + 1;
-				uint16_t step = delta_signal;
-
-				for (; index < luminance ; index++) {
-					as->backlight_8bit_lut[index] =
-							base_value +
-							(step / delta_luma);
-					step += delta_signal;
-				}
-			}
-			/* Now [index == luminance], so we can add
-			 * data point to the translation table */
-			as->backlight_8bit_lut[index++] = signal_level;
-		}
-		/* Complete the final segment of interpolation -
-		 * between last datapoint and maximum value */
-		if (index < 100) {
-			uint16_t base_value = as->backlight_8bit_lut[index-1];
-			uint16_t delta_signal =
-					as->backlight_8bit_lut[100]-base_value;
-			uint16_t delta_luma = 100 - index + 1;
-			uint16_t step = delta_signal;
-
-			for (; index < 100 ; index++) {
-				as->backlight_8bit_lut[index] = base_value +
-						(step / delta_luma);
-				step += delta_signal;
-			}
-		}
-	}
-	/* build backlight translation table based on default curve */
-	else {
-		/* Default backlight curve can be defined by
-		 * polinomial F(x) = A(x*x) + Bx + C.
-		 * Backlight curve should always  satisfy
-		 * F(0) = min, F(100) = max, so polinomial coefficients are:
-		 * A is 0.0255 - B/100 - min/10000 -
-		 * (255-max)/10000 = (max - min)/10000 - B/100
-		 * B is adjustable factor to modify the curve.
-		 * Bigger B results in less concave curve.
-		 * B range is [0..(max-min)/100]
-		 * C is backlight minimum
-		 */
-		uint16_t delta = as->backlight_8bit_lut[100] -
-				as->backlight_8bit_lut[0];
-		uint16_t coeffc = as->backlight_8bit_lut[0];
-		uint16_t coeffb = (BACKLIGHT_CURVE_COEFFB < delta ?
-				BACKLIGHT_CURVE_COEFFB : delta);
-		uint16_t coeffa = delta - coeffb;
-		uint16_t i;
-		uint32_t temp;
-
-		for (i = 1; i < 100 ; i++) {
-			temp = (coeffa * i * i) / BACKLIGHT_CURVE_COEFFA_FACTOR;
-			as->backlight_8bit_lut[i] = temp + (coeffb * i) /
-					BACKLIGHT_CURVE_COEFFB_FACTOR + coeffc;
-		}
-	}
-	as->backlight_caps_initialized = true;
-}
-/*
- * get_feature_value_from_data_sources
- *
- * For a given feature, determine its value from ASIC cap and wireless
- * data source.
- * idx : index of feature_entry_table for the feature id.
- */
-static bool get_feature_value_from_data_sources(
-		const struct adapter_service *as,
-		const uint32_t idx,
-		uint32_t *data)
-{
-	if (idx >= get_feature_entries_num()) {
-		ASSERT_CRITICAL(false);
-		return false;
-	}
-
-	switch (feature_entry_table[idx].feature_id) {
-	case FEATURE_WIRELESS_LIMIT_720P:
-		*data = as->asic_cap->caps.WIRELESS_LIMIT_TO_720P;
-		break;
-
-	case FEATURE_WIRELESS_FULL_TIMING_ADJUSTMENT:
-		*data = as->asic_cap->caps.WIRELESS_FULL_TIMING_ADJUSTMENT;
-		break;
-
-	case FEATURE_MODIFY_TIMINGS_FOR_WIRELESS:
-		*data = as->asic_cap->caps.WIRELESS_TIMING_ADJUSTMENT;
-		break;
-
-	case FEATURE_DETECT_REQUIRE_HPD_HIGH:
-		*data = as->asic_cap->caps.HPD_CHECK_FOR_EDID;
-		break;
-
-	case FEATURE_8BPP_SUPPORTED:
-		*data = as->asic_cap->caps.SUPPORT_8BPP;
-		break;
-
-	default:
-		return false;
-	}
-
-	return true;
-}
-
-/* get_bool_value
- *
- * Get the boolean value of a given feature
- */
-static bool get_bool_value(
-	const uint32_t set,
-	const uint32_t idx)
-{
-	if (idx >= 32) {
-		ASSERT_CRITICAL(false);
-		return false;
-	}
-
-	return ((set & (1 << idx)) != 0);
-}
-
-/*
- * lookup_feature_entry
- *
- * Find the entry index of a given feature in feature table
- */
-static uint32_t lookup_feature_entry(struct adapter_service *as,
-				     enum adapter_feature_id feature_id)
-{
-	uint32_t entries_num = get_feature_entries_num();
-	uint32_t i = 0;
-
-	while (i != entries_num) {
-		if (feature_entry_table[i].feature_id == feature_id)
-			break;
-
-		++i;
-	}
-
-	return i;
-}
-
-/*
- * set_bool_value
- *
- * Set the boolean value of a given feature
- */
-static void set_bool_value(
-	uint32_t *set,
-	const uint32_t idx,
-	bool value)
-{
-	if (idx >= 32) {
-		ASSERT_CRITICAL(false);
-		return;
-	}
-
-	if (value)
-		*set |= (1 << idx);
-	else
-		*set &= ~(1 << idx);
-}
-
-/*
- * generate_feature_set
- *
- * Generate the internal feature set from multiple data sources
- */
-static bool generate_feature_set(
-		struct adapter_service *as)
-{
-	uint32_t i = 0;
-	uint32_t value = 0;
-	uint32_t set_idx = 0;
-	uint32_t internal_idx = 0;
-	uint32_t entry_num = 0;
-	const struct feature_source_entry *entry = NULL;
-
-	memset(as->adapter_feature_set, 0, sizeof(as->adapter_feature_set));
-	entry_num = get_feature_entries_num();
-
-	while (i != entry_num) {
-		entry = &feature_entry_table[i];
-
-		if (entry->feature_id <= FEATURE_UNKNOWN ||
-				entry->feature_id >= FEATURE_MAXIMUM) {
-			ASSERT_CRITICAL(false);
-			return false;
-		}
-
-		set_idx = (uint32_t)((entry->feature_id - 1) / 32);
-		internal_idx = (uint32_t)((entry->feature_id - 1) % 32);
-
-		if (!get_feature_value_from_data_sources(
-				as, i, &value)) {
-			/*
-			 * Can't find feature values from
-			 * above data sources
-			 * Assign default value
-			 */
-			value = as->default_values[entry->feature_id];
-		}
-
-		if (entry->is_boolean_type)
-			set_bool_value(&as->adapter_feature_set[set_idx],
-					internal_idx,
-					value != 0);
-		else
-			as->adapter_feature_set[set_idx] = value;
-
-		i++;
-	}
-
-	return true;
-}
-
-/*
- * adapter_service_destruct
- *
- * Release memory of objects in adapter service
- */
-static void adapter_service_destruct(
-	struct adapter_service *as)
-{
-	dal_asic_capability_destroy(&as->asic_cap);
-}
-
-/*
- * adapter_service_construct
- *
- * Construct the derived type of adapter service
- */
-static bool adapter_service_construct(
-	struct adapter_service *as,
-	struct as_init_data *init_data)
-{
-	struct dc_bios *dcb;
-	uint32_t i;
-
-	if (!init_data)
-		return false;
-
-	/* Create ASIC capability */
-	as->ctx = init_data->ctx;
-	as->asic_cap = dal_asic_capability_create(
-			&init_data->hw_init_data, as->ctx);
-
-	if (!as->asic_cap) {
-		ASSERT_CRITICAL(false);
-		return false;
-	}
-
-	for (i = 0; i < ARRAY_SIZE(feature_entry_table); i++) {
-		enum adapter_feature_id id =
-			feature_entry_table[i].feature_id;
-
-		as->default_values[id] = feature_entry_table[i].default_value;
-	}
-
-	if (as->ctx->dce_version == DCE_VERSION_11_0) {
-		uint32_t i;
-
-		for (i = 0; i < ARRAY_SIZE(feature_entry_table); i++) {
-			enum adapter_feature_id id =
-				feature_entry_table[i].feature_id;
-
-			if (id == FEATURE_MAXIMIZE_URGENCY_WATERMARKS ||
-				id == FEATURE_MAXIMIZE_STUTTER_MARKS ||
-				id == FEATURE_MAXIMIZE_NBP_MARKS)
-				as->default_values[id] = true;
-		}
-	}
-
-	/* Generate feature set table */
-	if (!generate_feature_set(as)) {
-		ASSERT_CRITICAL(false);
-		goto failed_to_generate_features;
-	}
-
-	as->dce_environment = init_data->dce_environment;
-
-	dcb = as->ctx->dc_bios;
-
-	dcb->funcs->post_init(dcb);
-
-	/* Generate backlight translation table and initializes
-			  other brightness properties */
-	as->backlight_caps_initialized = false;
-
-	get_platform_info_methods(as);
-
-	initialize_backlight_caps(as);
-
-	return true;
-
-failed_to_generate_features:
-	dal_asic_capability_destroy(&as->asic_cap);
-
-	return false;
-}
-
-/*
- * Global function definition
- */
-
-/*
- * dal_adapter_service_create
- *
- * Create adapter service
- */
-struct adapter_service *dal_adapter_service_create(
-	struct as_init_data *init_data)
-{
-	struct adapter_service *as;
-
-	as = dm_alloc(sizeof(struct adapter_service));
-
-	if (!as) {
-		ASSERT_CRITICAL(false);
-		return NULL;
-	}
-
-	if (adapter_service_construct(as, init_data))
-		return as;
-
-	ASSERT_CRITICAL(false);
-
-	dm_free(as);
-
-	return NULL;
-}
-
-/*
- * dal_adapter_service_destroy
- *
- * Destroy adapter service and objects it contains
- */
-void dal_adapter_service_destroy(
-	struct adapter_service **as)
-{
-	if (!as) {
-		ASSERT_CRITICAL(false);
-		return;
-	}
-
-	if (!*as) {
-		ASSERT_CRITICAL(false);
-		return;
-	}
-
-	adapter_service_destruct(*as);
-
-	dm_free(*as);
-
-	*as = NULL;
-}
-
-
diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.h b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.h
deleted file mode 100644
index 823322bfc3a2..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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
- *
- */
-
-#ifndef __DAL_ADAPTER_SERVICE_H__
-#define __DAL_ADAPTER_SERVICE_H__
-
-/* Include */
-#include "dc_bios_types.h"
-#include "include/adapter_service_interface.h"
-
-
-#endif /* __DAL_ADAPTER_SERVICE_H__ */
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/Makefile b/drivers/gpu/drm/amd/dal/dc/asic_capability/Makefile
deleted file mode 100644
index 01ba25d1c2fa..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Makefile for the 'asic_capability' sub-component of DAL.
-#
-
-ASIC_CAPABILITY = asic_capability.o
-
-AMD_DAL_ASIC_CAPABILITY = \
-	$(addprefix $(AMDDALPATH)/dc/asic_capability/,$(ASIC_CAPABILITY))
-
-AMD_DAL_FILES += $(AMD_DAL_ASIC_CAPABILITY)
-
-###############################################################################
-# DCE 8x
-###############################################################################
-ASIC_CAPABILITY_DCE80 = hawaii_asic_capability.o
-
-AMD_DAL_ASIC_CAPABILITY_DCE80 = \
-	$(addprefix $(AMDDALPATH)/dc/asic_capability/,$(ASIC_CAPABILITY_DCE80))
-
-AMD_DAL_FILES += $(AMD_DAL_ASIC_CAPABILITY_DCE80)
-
-
-###############################################################################
-# DCE 10x
-###############################################################################
-ASIC_CAPABILITY_DCE10 = tonga_asic_capability.o
-
-AMD_DAL_ASIC_CAPABILITY_DCE10 = \
-	$(addprefix $(AMDDALPATH)/dc/asic_capability/,$(ASIC_CAPABILITY_DCE10))
-
-AMD_DAL_FILES += $(AMD_DAL_ASIC_CAPABILITY_DCE10)
-
-
-###############################################################################
-# DCE 11x
-###############################################################################
-ASIC_CAPABILITY_DCE11 = carrizo_asic_capability.o
-
-AMD_DAL_ASIC_CAPABILITY_DCE11 = \
-	$(addprefix $(AMDDALPATH)/dc/asic_capability/,$(ASIC_CAPABILITY_DCE11))
-
-AMD_DAL_FILES += $(AMD_DAL_ASIC_CAPABILITY_DCE11)
-
-
-ASIC_CAPABILITY_DCE112 = polaris10_asic_capability.o
-
-AMD_DAL_ASIC_CAPABILITY_DCE112 = \
-	$(addprefix $(AMDDALPATH)/dc/asic_capability/,$(ASIC_CAPABILITY_DCE112))
-
-AMD_DAL_FILES += $(AMD_DAL_ASIC_CAPABILITY_DCE112)
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/asic_capability.c b/drivers/gpu/drm/amd/dal/dc/asic_capability/asic_capability.c
deleted file mode 100644
index 89dd74675ba9..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/asic_capability.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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 "dm_services.h"
-
-#include "include/logger_interface.h"
-
-#include "include/asic_capability_interface.h"
-#include "include/asic_capability_types.h"
-#include "include/dal_types.h"
-#include "include/dal_asic_id.h"
-
-#include "hawaii_asic_capability.h"
-
-#include "tonga_asic_capability.h"
-
-#include "carrizo_asic_capability.h"
-
-#include "polaris10_asic_capability.h"
-
-/*
- * Initializes asic_capability instance.
- */
-static bool construct(
-	struct asic_capability *cap,
-	struct hw_asic_id *init,
-	struct dc_context *ctx)
-{
-	bool asic_supported = false;
-
-	cap->ctx = ctx;
-	memset(cap->data, 0, sizeof(cap->data));
-
-	/* ASIC data */
-	cap->data[ASIC_DATA_MAX_UNDERSCAN_PERCENTAGE] = 10;
-	cap->data[ASIC_DATA_VIEWPORT_PIXEL_GRANULARITY] = 4;
-	cap->data[ASIC_DATA_DOWNSCALE_LIMIT] = 200;
-
-	/* ASIC basic capability */
-	cap->caps.UNDERSCAN_FOR_HDMI_ONLY = true;
-	cap->caps.SUPPORT_CEA861E_FINAL = true;
-	cap->caps.MIRABILIS_SUPPORTED = false;
-	cap->caps.MIRABILIS_ENABLED_BY_DEFAULT = false;
-	cap->caps.WIRELESS_LIMIT_TO_720P = false;
-	cap->caps.WIRELESS_FULL_TIMING_ADJUSTMENT = false;
-	cap->caps.WIRELESS_TIMING_ADJUSTMENT = true;
-	cap->caps.WIRELESS_COMPRESSED_AUDIO = false;
-	cap->caps.VCE_SUPPORTED = false;
-	cap->caps.HPD_CHECK_FOR_EDID = false;
-	cap->caps.NEED_MC_TUNING = false;
-	cap->caps.SUPPORT_8BPP = true;
-
-	/* ASIC stereo 3D capability */
-	cap->stereo_3d_caps.SUPPORTED = true;
-
-	switch (init->chip_family) {
-	case FAMILY_CI:
-		dal_hawaii_asic_capability_create(cap, init);
-		asic_supported = true;
-		break;
-
-	case FAMILY_KV:
-		break;
-
-	case FAMILY_CZ:
-		carrizo_asic_capability_create(cap, init);
-		asic_supported = true;
-		break;
-
-	case FAMILY_VI:
-		if (ASIC_REV_IS_TONGA_P(init->hw_internal_rev) ||
-				ASIC_REV_IS_FIJI_P(init->hw_internal_rev)) {
-			tonga_asic_capability_create(cap, init);
-			asic_supported = true;
-			break;
-		}
-		if (ASIC_REV_IS_POLARIS10_P(init->hw_internal_rev) ||
-				ASIC_REV_IS_POLARIS11_M(init->hw_internal_rev)) {
-			polaris10_asic_capability_create(cap, init);
-			asic_supported = true;
-		}
-		break;
-
-	default:
-		/* unsupported "chip_family" */
-		break;
-	}
-
-	if (false == asic_supported) {
-		dm_logger_write(ctx->logger, LOG_ERROR,
-			"%s: ASIC not supported!\n", __func__);
-	}
-
-	return asic_supported;
-}
-
-static void destruct(
-	struct asic_capability *cap)
-{
-	/* nothing to do (yet?) */
-}
-
-/*
- * dal_asic_capability_create
- *
- * Creates asic capability based on DCE version.
- */
-struct asic_capability *dal_asic_capability_create(
-	struct hw_asic_id *init,
-	struct dc_context *ctx)
-{
-	struct asic_capability *cap;
-
-	if (!init) {
-		BREAK_TO_DEBUGGER();
-		return NULL;
-	}
-
-	cap = dm_alloc(sizeof(struct asic_capability));
-
-	if (!cap) {
-		BREAK_TO_DEBUGGER();
-		return NULL;
-	}
-
-	if (construct(cap, init, ctx))
-		return cap;
-
-	BREAK_TO_DEBUGGER();
-
-	dm_free(cap);
-
-	return NULL;
-}
-
-/*
- * dal_asic_capability_destroy
- *
- * Destroy allocated memory.
- */
-void dal_asic_capability_destroy(
-	struct asic_capability **cap)
-{
-	if (!cap) {
-		BREAK_TO_DEBUGGER();
-		return;
-	}
-
-	if (!*cap) {
-		BREAK_TO_DEBUGGER();
-		return;
-	}
-
-	destruct(*cap);
-
-	dm_free(*cap);
-
-	*cap = NULL;
-}
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/carrizo_asic_capability.c b/drivers/gpu/drm/amd/dal/dc/asic_capability/carrizo_asic_capability.c
deleted file mode 100644
index 7243e51e909f..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/carrizo_asic_capability.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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 "dm_services.h"
-
-#include "include/asic_capability_interface.h"
-#include "include/asic_capability_types.h"
-
-#include "carrizo_asic_capability.h"
-
-#include "atom.h"
-#include "dce/dce_11_0_d.h"
-#include "smu/smu_8_0_d.h"
-#include "dce/dce_11_0_sh_mask.h"
-#include "dal_asic_id.h"
-
-#define ixVCE_HARVEST_FUSE_MACRO__ADDRESS 0xC0014074
-
-/*
- * carrizo_asic_capability_create
- *
- * Create and initiate Carrizo capability.
- */
-void carrizo_asic_capability_create(struct asic_capability *cap,
-	struct hw_asic_id *init)
-{
-	uint32_t e_fuse_setting;
-	/* ASIC data */
-	cap->data[ASIC_DATA_PATH_NUM_PER_DPMST_CONNECTOR] = 4;
-	cap->data[ASIC_DATA_DCE_VERSION] = 0x110; /* DCE 11 */
-	cap->data[ASIC_DATA_LINEBUFFER_SIZE] = 1712 * 144;
-	cap->data[ASIC_DATA_DRAM_BANDWIDTH_EFFICIENCY] = 45;
-	cap->data[ASIC_DATA_MC_LATENCY] = 5000;
-	cap->data[ASIC_DATA_VIEWPORT_PIXEL_GRANULARITY] = 2;
-	cap->data[ASIC_DATA_MEMORYTYPE_MULTIPLIER] = 2;
-	cap->data[ASIC_DATA_DOWNSCALE_LIMIT] = 150;
-
-	/* ASIC basic capability */
-	cap->caps.IS_FUSION = true;
-	cap->caps.DP_MST_SUPPORTED = true;
-	cap->caps.PANEL_SELF_REFRESH_SUPPORTED = true;
-	cap->caps.MIRABILIS_SUPPORTED = true;
-	cap->caps.VCE_SUPPORTED = true;
-	cap->caps.HPD_CHECK_FOR_EDID = true;
-	cap->caps.DFSBYPASS_DYNAMIC_SUPPORT = true;
-	cap->caps.SUPPORT_8BPP = false;
-
-	/* ASIC stereo 3d capability */
-	cap->stereo_3d_caps.DISPLAY_BASED_ON_WS = true;
-	cap->stereo_3d_caps.HDMI_FRAME_PACK = true;
-	cap->stereo_3d_caps.INTERLACE_FRAME_PACK = true;
-	cap->stereo_3d_caps.DISPLAYPORT_FRAME_PACK = true;
-	cap->stereo_3d_caps.DISPLAYPORT_FRAME_ALT = true;
-	cap->stereo_3d_caps.INTERLEAVE = true;
-
-	e_fuse_setting = dm_read_index_reg(cap->ctx,CGS_IND_REG__SMC, ixVCE_HARVEST_FUSE_MACRO__ADDRESS);
-
-	/* Bits [28:27]*/
-	switch ((e_fuse_setting >> 27) & 0x3) {
-	case 0:
-		/*both VCE engine are working*/
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = false;
-		/*TODO:
-		cap->caps.wirelessLowVCEPerformance = false;
-		m_AsicCaps.vceInstance0Enabled = true;
-		m_AsicCaps.vceInstance1Enabled = true;*/
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 1:
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = true;
-		/*TODO:
-		m_AsicCaps.wirelessLowVCEPerformance = false;
-		m_AsicCaps.vceInstance1Enabled = true;*/
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 2:
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = true;
-		/*TODO:
-		m_AsicCaps.wirelessLowVCEPerformance = false;
-		m_AsicCaps.vceInstance0Enabled = true;*/
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 3:
-		/* VCE_DISABLE = 0x3  - both VCE
-		 * instances are in harvesting,
-		 * no VCE supported any more.
-		 */
-		cap->caps.VCE_SUPPORTED = false;
-		break;
-
-	default:
-		break;
-	}
-
-	if (ASIC_REV_IS_STONEY(init->hw_internal_rev))
-	{
-		/* Stoney is the same DCE11, but only two pipes, three  digs.
-		 * and HW added 64bit back for non SG */
-		/*3 DP MST per connector, limited by number of pipe and number
-		 * of Dig.*/
-		cap->data[ASIC_DATA_PATH_NUM_PER_DPMST_CONNECTOR] = 2;
-
-	}
-
-}
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/carrizo_asic_capability.h b/drivers/gpu/drm/amd/dal/dc/asic_capability/carrizo_asic_capability.h
deleted file mode 100644
index d1e9b8337d5b..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/carrizo_asic_capability.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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
- *
- */
-
-#ifndef __DAL_CARRIZO_ASIC_CAPABILITY_H__
-#define __DAL_CARRIZO_ASIC_CAPABILITY_H__
-
-/* Forward declaration */
-struct asic_capability;
-
-/* Create and initialize Carrizo data */
-void carrizo_asic_capability_create(struct asic_capability *cap,
-	struct hw_asic_id *init);
-
-#endif /* __DAL_CARRIZO_ASIC_CAPABILITY_H__ */
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/hawaii_asic_capability.c b/drivers/gpu/drm/amd/dal/dc/asic_capability/hawaii_asic_capability.c
deleted file mode 100644
index e0c9ef4557e7..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/hawaii_asic_capability.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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
- *
- */
-
-/*
- * Includes
- */
-
-#include "dm_services.h"
-
-#include "include/asic_capability_interface.h"
-#include "include/asic_capability_types.h"
-#include "include/dal_types.h"
-#include "include/dal_asic_id.h"
-#include "include/logger_interface.h"
-#include "hawaii_asic_capability.h"
-
-#include "atom.h"
-
-#include "dce/dce_8_0_d.h"
-#include "gmc/gmc_7_1_d.h"
-
-/*
- * Sea Islands (CI) ASIC capability.
- *
- * dal_hawaii_asic_capability_create
- *
- * Create and initiate hawaii capability.
- */
-void dal_hawaii_asic_capability_create(struct asic_capability *cap,
-		struct hw_asic_id *init)
-{
-	uint32_t mc_seq_misc0;
-
-	/* ASIC data */
-	cap->data[ASIC_DATA_MIN_DISPCLK_FOR_UNDERSCAN] = 300000;
-
-	cap->data[ASIC_DATA_DCE_VERSION] = 0x80; /* DCE 8.0 */
-
-	/* Pixel RAM is 1712 entries of 144 bits each or
-	 * in other words 246528 bits. */
-	cap->data[ASIC_DATA_LINEBUFFER_SIZE] = 1712 * 144;
-	cap->data[ASIC_DATA_DRAM_BANDWIDTH_EFFICIENCY] = 70;
-	cap->data[ASIC_DATA_MC_LATENCY] = 5000; /* units of ns */
-	cap->data[ASIC_DATA_PATH_NUM_PER_DPMST_CONNECTOR] = 4;
-	cap->data[ASIC_DATA_VIEWPORT_PIXEL_GRANULARITY] = 2;
-
-	mc_seq_misc0 = dm_read_reg(cap->ctx, mmMC_SEQ_MISC0);
-
-	switch (mc_seq_misc0 & MC_MISC0__MEMORY_TYPE_MASK) {
-	case MC_MISC0__MEMORY_TYPE__GDDR1:
-	case MC_MISC0__MEMORY_TYPE__DDR2:
-	case MC_MISC0__MEMORY_TYPE__DDR3:
-	case MC_MISC0__MEMORY_TYPE__GDDR3:
-	case MC_MISC0__MEMORY_TYPE__GDDR4:
-		cap->data[ASIC_DATA_MEMORYTYPE_MULTIPLIER] = 2;
-		break;
-	case MC_MISC0__MEMORY_TYPE__GDDR5:
-		cap->data[ASIC_DATA_MEMORYTYPE_MULTIPLIER] = 4;
-		break;
-	default:
-		dm_logger_write(cap->ctx->logger, LOG_ERROR,
-			"%s:Unrecognized memory type!", __func__);
-		cap->data[ASIC_DATA_MEMORYTYPE_MULTIPLIER] = 2;
-		break;
-	}
-
-	/* ASIC stereo 3D capability */
-	cap->stereo_3d_caps.INTERLEAVE = true;
-	cap->stereo_3d_caps.HDMI_FRAME_PACK = true;
-	cap->stereo_3d_caps.INTERLACE_FRAME_PACK = true;
-	cap->stereo_3d_caps.DISPLAYPORT_FRAME_PACK = true;
-	cap->stereo_3d_caps.DISPLAYPORT_FRAME_ALT = true;
-	cap->stereo_3d_caps.DISPLAY_BASED_ON_WS = true;
-
-	/* ASIC basic capability */
-	cap->caps.DP_MST_SUPPORTED = true;
-	cap->caps.PANEL_SELF_REFRESH_SUPPORTED = true;
-
-	cap->caps.MIRABILIS_SUPPORTED = true;
-	cap->caps.MIRABILIS_ENABLED_BY_DEFAULT = true;
-
-	/* Remap device tag IDs when patching VBIOS. */
-	cap->caps.DEVICE_TAG_REMAP_SUPPORTED = true;
-
-	/* Report headless if no OPM attached (with MXM connectors present). */
-	cap->caps.HEADLESS_NO_OPM_SUPPORTED = true;
-
-	cap->caps.HPD_CHECK_FOR_EDID = true;
-
-	/* true will hang the system! */
-	cap->caps.DFSBYPASS_DYNAMIC_SUPPORT = false;
-
-	/* Do w/a on CI A0 by default */
-	if (init->hw_internal_rev == CI_BONAIRE_M_A0)
-		cap->bugs.LB_WA_IS_SUPPORTED = true;
-
-	/* Apply MC Tuning for Hawaii */
-	if (ASIC_REV_IS_HAWAII_P(init->hw_internal_rev))
-		cap->caps.NEED_MC_TUNING = true;
-
-	/* DCE6.0 and DCE8.0 has a HW issue when accessing registers
-	 * from ROM block. When there is a W access following R or W access
-	 * right after (no more than couple of cycles)  the first W access
-	 * sometimes is not executed (in rate of about once per 100K tries).
-	 * It creates problems in different scenarios of FL setup. */
-	cap->bugs.ROM_REGISTER_ACCESS = true;
-
-	/* VCE is supported */
-	cap->caps.VCE_SUPPORTED = true;
-}
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/hawaii_asic_capability.h b/drivers/gpu/drm/amd/dal/dc/asic_capability/hawaii_asic_capability.h
deleted file mode 100644
index 191d9b293e29..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/hawaii_asic_capability.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- *
- */
-
-#ifndef __DAL_BONAIRE_CAPABILITY_H__
-#define __DAL_BONAIRE_CAPABILITY_H__
-
-/* Forward declaration */
-struct asic_capability;
-struct hw_asic_id;
-
-/* Create and initialise Bonaire data */
-void dal_hawaii_asic_capability_create(struct asic_capability *cap,
-		struct hw_asic_id *init);
-
-#endif /* __DAL_BONAIRE_CAPABILITY_H__ */
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/polaris10_asic_capability.c b/drivers/gpu/drm/amd/dal/dc/asic_capability/polaris10_asic_capability.c
deleted file mode 100644
index 7716d6587793..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/polaris10_asic_capability.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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 "dm_services.h"
-
-#include "include/asic_capability_interface.h"
-#include "include/asic_capability_types.h"
-
-#include "polaris10_asic_capability.h"
-
-#include "atom.h"
-#include "dce/dce_11_2_d.h"
-#include "dce/dce_11_2_sh_mask.h"
-#include "dal_asic_id.h"
-
-#define ixVCE_HARVEST_FUSE_MACRO__ADDRESS 0xC0014074
-
-/*
- * carrizo_asic_capability_create
- *
- * Create and initiate Carrizo capability.
- */
-void polaris10_asic_capability_create(struct asic_capability *cap,
-	struct hw_asic_id *init)
-{
-	uint32_t e_fuse_setting;
-	/* ASIC data */
-
-	cap->data[ASIC_DATA_PATH_NUM_PER_DPMST_CONNECTOR] = 4;
-	cap->data[ASIC_DATA_DCE_VERSION] = 0x112; /* DCE 11 */
-	cap->data[ASIC_DATA_LINEBUFFER_SIZE] = 5124 * 144;
-	cap->data[ASIC_DATA_DRAM_BANDWIDTH_EFFICIENCY] = 70;
-
-	cap->data[ASIC_DATA_MC_LATENCY] = 3000;
-	cap->data[ASIC_DATA_VIEWPORT_PIXEL_GRANULARITY] = 2;
-
-	cap->data[ASIC_DATA_MEMORYTYPE_MULTIPLIER] = 4;
-
-	cap->data[ASIC_DATA_MIN_DISPCLK_FOR_UNDERSCAN] = 300000;
-
-	/* ASIC basic capability */
-	cap->caps.IS_FUSION = true;
-	cap->caps.DP_MST_SUPPORTED = true;
-	cap->caps.PANEL_SELF_REFRESH_SUPPORTED = true;
-	cap->caps.MIRABILIS_SUPPORTED = true;
-	cap->caps.VCE_SUPPORTED = true;
-	cap->caps.HPD_CHECK_FOR_EDID = true;
-	cap->caps.DFSBYPASS_DYNAMIC_SUPPORT = true;
-	cap->caps.SUPPORT_8BPP = false;
-
-	/* ASIC stereo 3d capability */
-	cap->stereo_3d_caps.DISPLAY_BASED_ON_WS = true;
-	cap->stereo_3d_caps.HDMI_FRAME_PACK = true;
-	cap->stereo_3d_caps.INTERLACE_FRAME_PACK = true;
-	cap->stereo_3d_caps.DISPLAYPORT_FRAME_PACK = true;
-	cap->stereo_3d_caps.DISPLAYPORT_FRAME_ALT = true;
-	cap->stereo_3d_caps.INTERLEAVE = true;
-
-	e_fuse_setting = dm_read_index_reg(cap->ctx,CGS_IND_REG__SMC, ixVCE_HARVEST_FUSE_MACRO__ADDRESS);
-
-	/* Bits [28:27]*/
-	switch ((e_fuse_setting >> 27) & 0x3) {
-	case 0:
-		/*both VCE engine are working*/
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = false;
-		/*TODO:
-		cap->caps.wirelessLowVCEPerformance = false;
-		m_AsicCaps.vceInstance0Enabled = true;
-		m_AsicCaps.vceInstance1Enabled = true;*/
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 1:
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = true;
-		/*TODO:
-		m_AsicCaps.wirelessLowVCEPerformance = false;
-		m_AsicCaps.vceInstance1Enabled = true;*/
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 2:
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = true;
-		/*TODO:
-		m_AsicCaps.wirelessLowVCEPerformance = false;
-		m_AsicCaps.vceInstance0Enabled = true;*/
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 3:
-		/* VCE_DISABLE = 0x3  - both VCE
-		 * instances are in harvesting,
-		 * no VCE supported any more.
-		 */
-		cap->caps.VCE_SUPPORTED = false;
-		break;
-
-	default:
-		break;
-	}
-}
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/polaris10_asic_capability.h b/drivers/gpu/drm/amd/dal/dc/asic_capability/polaris10_asic_capability.h
deleted file mode 100644
index c8aebe1541c4..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/polaris10_asic_capability.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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
- *
- */
-
-#ifndef __DAL_POLARIS10_ASIC_CAPABILITY_H__
-#define __DAL_POLARIS10_ASIC_CAPABILITY_H__
-
-/* Forward declaration */
-struct asic_capability;
-
-/* Create and initialize Polaris10 data */
-void polaris10_asic_capability_create(struct asic_capability *cap,
-	struct hw_asic_id *init);
-
-#endif /* __DAL_POLARIS10_ASIC_CAPABILITY_H__ */
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/tonga_asic_capability.c b/drivers/gpu/drm/amd/dal/dc/asic_capability/tonga_asic_capability.c
deleted file mode 100644
index 6c819ab8fd6e..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/tonga_asic_capability.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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 "dm_services.h"
-
-#include "include/asic_capability_interface.h"
-#include "include/asic_capability_types.h"
-
-#include "tonga_asic_capability.h"
-
-#include "atom.h"
-#include "dce/dce_10_0_d.h"
-#include "dce/dce_10_0_sh_mask.h"
-#include "dal_asic_id.h"
-
-#define ixVCE_HARVEST_FUSE_MACRO__ADDRESS     0xC0014074
-
-/*
- * carrizo_asic_capability_create
- *
- * Create and initiate Carrizo capability.
- */
-void tonga_asic_capability_create(struct asic_capability *cap,
-	struct hw_asic_id *init)
-{
-	uint32_t e_fuse_setting;
-	/* ASIC data */
-	cap->data[ASIC_DATA_LINEBUFFER_SIZE] = 1712 * 144;
-	cap->data[ASIC_DATA_DRAM_BANDWIDTH_EFFICIENCY] = 70;
-	cap->data[ASIC_DATA_MC_LATENCY] = 5000;
-	cap->data[ASIC_DATA_PATH_NUM_PER_DPMST_CONNECTOR] = 4;
-	cap->data[ASIC_DATA_VIEWPORT_PIXEL_GRANULARITY] = 2;
-	cap->data[ASIC_DATA_MIN_DISPCLK_FOR_UNDERSCAN] = 300000;
-
-	cap->data[ASIC_DATA_DCE_VERSION] = 0x100; /* DCE 11 */
-
-	cap->data[ASIC_DATA_MEMORYTYPE_MULTIPLIER] = 4;
-
-	/* ASIC basic capability */
-	cap->caps.IS_FUSION = true;
-	cap->caps.DP_MST_SUPPORTED = true;
-	cap->caps.PANEL_SELF_REFRESH_SUPPORTED = true;
-	cap->caps.MIRABILIS_SUPPORTED = true;
-	cap->caps.VCE_SUPPORTED = true;
-	cap->caps.HPD_CHECK_FOR_EDID = true;
-	cap->caps.DFSBYPASS_DYNAMIC_SUPPORT = true;
-	cap->caps.SUPPORT_8BPP = false;
-
-	/* ASIC stereo 3d capability */
-	cap->stereo_3d_caps.DISPLAY_BASED_ON_WS = true;
-	cap->stereo_3d_caps.HDMI_FRAME_PACK = true;
-	cap->stereo_3d_caps.INTERLACE_FRAME_PACK = true;
-	cap->stereo_3d_caps.DISPLAYPORT_FRAME_PACK = true;
-	cap->stereo_3d_caps.DISPLAYPORT_FRAME_ALT = true;
-	cap->stereo_3d_caps.INTERLEAVE = true;
-
-	e_fuse_setting = dm_read_index_reg(cap->ctx, CGS_IND_REG__SMC,
-		ixVCE_HARVEST_FUSE_MACRO__ADDRESS);
-
-	/* Bits [28:27]*/
-	switch ((e_fuse_setting >> 27) & 0x3) {
-	case 0:
-		/* both VCE engine are working*/
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = false;
-		/*
-		 * TODO:
-		 * cap->caps.wirelessLowVCEPerformance = false;
-		 * m_AsicCaps.vceInstance0Enabled = true;
-		 * m_AsicCaps.vceInstance1Enabled = true;
-		 */
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 1:
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = true;
-		/*
-		 * TODO:
-		 * m_AsicCaps.wirelessLowVCEPerformance = false;
-		 * m_AsicCaps.vceInstance1Enabled = true;
-		 */
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 2:
-		cap->caps.VCE_SUPPORTED = true;
-		cap->caps.WIRELESS_TIMING_ADJUSTMENT = true;
-		/*
-		 * TODO:
-		 * m_AsicCaps.wirelessLowVCEPerformance = false;
-		 * m_AsicCaps.vceInstance0Enabled = true;
-		 */
-		cap->caps.NEED_MC_TUNING = true;
-		break;
-
-	case 3:
-		/*
-		 * VCE_DISABLE = 0x3  - both VCE
-		 * instances are in harvesting,
-		 * no VCE supported any more.
-		 */
-		cap->caps.VCE_SUPPORTED = false;
-		break;
-
-	default:
-		break;
-	}
-
-}
diff --git a/drivers/gpu/drm/amd/dal/dc/asic_capability/tonga_asic_capability.h b/drivers/gpu/drm/amd/dal/dc/asic_capability/tonga_asic_capability.h
deleted file mode 100644
index ca6d68368386..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/asic_capability/tonga_asic_capability.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * tonga_asic_capability.h
- *
- *  Created on: 2016-01-18
- *      Author: qyang
- */
-
-#ifndef TONGA_ASIC_CAPABILITY_H_
-#define TONGA_ASIC_CAPABILITY_H_
-
-/* Forward declaration */
-struct asic_capability;
-
-/* Create and initialize Carrizo data */
-void tonga_asic_capability_create(struct asic_capability *cap,
-	struct hw_asic_id *init);
-
-#endif /* TONGA_ASIC_CAPABILITY_H_ */
diff --git a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c
index 1d3ee3f10f3e..7fdce9b62f1d 100644
--- a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c
@@ -42,8 +42,6 @@
 #include "bios_parser_types_internal.h"
 #include "bios_parser_interface.h"
 
-/* TODO remove - only needed for gpio_service */
-#include "adapter/adapter_service.h"
 /* TODO remove - only needed for default i2c speed */
 #include "dc.h"
 
diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c
index a3c9cb3e1249..e58b27fc3322 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c
@@ -157,37 +157,6 @@ failed_alloc:
 	return false;
 }
 
-
-
-static struct adapter_service *create_as(
-		const struct dc_init_data *init,
-		struct dc_context *dc_ctx)
-{
-	struct adapter_service *as = NULL;
-	struct as_init_data init_data;
-
-	memset(&init_data, 0, sizeof(init_data));
-
-	init_data.ctx = dc_ctx;
-
-	/* HW init data */
-	init_data.hw_init_data.chip_id = init->asic_id.chip_id;
-	init_data.hw_init_data.chip_family = init->asic_id.chip_family;
-	init_data.hw_init_data.pci_revision_id = init->asic_id.pci_revision_id;
-	init_data.hw_init_data.fake_paths_num = init->asic_id.fake_paths_num;
-	init_data.hw_init_data.feature_flags = init->asic_id.feature_flags;
-	init_data.hw_init_data.hw_internal_rev = init->asic_id.hw_internal_rev;
-	init_data.hw_init_data.vram_width = init->asic_id.vram_width;
-	init_data.hw_init_data.vram_type = init->asic_id.vram_type;
-
-	init_data.vbios_override = init->vbios_override;
-	init_data.dce_environment = init->dce_environment;
-
-	as = dal_adapter_service_create(&init_data);
-
-	return as;
-}
-
 static bool stream_adjust_vmin_vmax(struct dc *dc,
 		const struct dc_stream **stream, int num_streams,
 		int vmin, int vmax)
@@ -488,9 +457,6 @@ static void destruct(struct core_dc *dc)
 	if (dc->ctx->gpio_service)
 		dal_gpio_service_destroy(&dc->ctx->gpio_service);
 
-	if (dc->ctx->adapter_srv)
-		dal_adapter_service_destroy(&dc->ctx->adapter_srv);
-
 	if (dc->ctx->i2caux)
 		dal_i2caux_destroy(&dc->ctx->i2caux);
 
@@ -510,7 +476,6 @@ static bool construct(struct core_dc *dc,
 		const struct dc_init_data *init_params)
 {
 	struct dal_logger *logger;
-	struct adapter_service *as = NULL;
 	struct dc_context *dc_ctx = dm_alloc(sizeof(*dc_ctx));
 	enum dce_version dc_version = DCE_VERSION_UNKNOWN;
 
@@ -577,18 +542,6 @@ static bool construct(struct core_dc *dc,
 		goto failed_to_create_i2caux;
 	}
 
-	/* TODO: Refactor DCE code to remove AS and asic caps */
-	if (dc_version < DCE_VERSION_MAX) {
-		/* Create adapter service */
-		as = create_as(init_params, dc_ctx);
-
-		if (!as) {
-			dm_error("%s: create_as() failed!\n", __func__);
-			goto as_fail;
-		}
-		dc_ctx->adapter_srv = as;
-	}
-
 	/* Create GPIO service */
 	dc_ctx->gpio_service = dal_gpio_service_create(
 			dc_version,
@@ -619,7 +572,6 @@ static bool construct(struct core_dc *dc,
 create_links_fail:
 create_resource_fail:
 gpio_fail:
-as_fail:
 failed_to_create_i2caux:
 bios_fail:
 logger_fail:
diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
index c0b5c2c5b8e0..620ef03651f1 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
@@ -39,13 +39,8 @@
 #include "hw_sequencer.h"
 #include "resource.h"
 #include "fixed31_32.h"
-#include "adapter/adapter_service.h"
 #include "include/asic_capability_interface.h"
 
-
-/* TODO remove - only needed for gpio_service */
-#include "adapter/adapter_service.h"
-
 #include "dce/dce_11_0_d.h"
 #include "dce/dce_11_0_enum.h"
 #include "dce/dce_11_0_sh_mask.h"
diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/dal/dc/core/dc_link_ddc.c
index 6be8e08e3d99..7f6d5ec27058 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_link_ddc.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link_ddc.c
@@ -35,9 +35,6 @@
 #include "core_types.h"
 #include "dc_link_ddc.h"
 
-/* TODO remove - only needed for gpio_service */
-#include "adapter/adapter_service.h"
-
 #define AUX_POWER_UP_WA_DELAY 500
 #define I2C_OVER_AUX_DEFER_WA_DELAY 70
 
diff --git a/drivers/gpu/drm/amd/dal/dc/dc_types.h b/drivers/gpu/drm/amd/dal/dc/dc_types.h
index fb8d094429bc..ae9fcca121e6 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc_types.h
@@ -92,7 +92,6 @@ struct dc_context {
 	bool created_bios;
 	struct gpio_service *gpio_service;
 	struct i2caux *i2caux;
-	struct adapter_service *adapter_srv;
 };
 
 
diff --git a/drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.c
index b924b3d5bc22..3b3c01a647bc 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.c
@@ -35,9 +35,6 @@
 
 #include "gpio_service_interface.h"
 
-/* TODO remove - only needed for gpio_service */
-#include "adapter/adapter_service.h"
-
 #include "dce/dce_11_0_d.h"
 #include "dce/dce_11_0_sh_mask.h"
 #include "dce/dce_11_0_enum.h"
-- 
2.10.1



More information about the amd-gfx mailing list