[PATCH 05/76] drm/amd/dal: Remove wireless_data_source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Harry Wentland <harry.wentland at amd.com>
Acked-by: Harry Wentland <harry.wentland at amd.com>
---
 drivers/gpu/drm/amd/dal/dc/adapter/Makefile        |   2 +-
 .../gpu/drm/amd/dal/dc/adapter/adapter_service.c   |  36 +---
 .../gpu/drm/amd/dal/dc/adapter/adapter_service.h   |   2 -
 .../drm/amd/dal/dc/adapter/wireless_data_source.c  | 208 ---------------------
 .../drm/amd/dal/dc/adapter/wireless_data_source.h  |  79 --------
 5 files changed, 8 insertions(+), 319 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/adapter/wireless_data_source.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/adapter/wireless_data_source.h

diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/Makefile b/drivers/gpu/drm/amd/dal/dc/adapter/Makefile
index a70cf1363a90..3297656bf948 100644
--- a/drivers/gpu/drm/amd/dal/dc/adapter/Makefile
+++ b/drivers/gpu/drm/amd/dal/dc/adapter/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the 'adapter' sub-component of DAL.
 # It provides the control and status of HW adapter.
 
-ADAPTER = adapter_service.o wireless_data_source.o
+ADAPTER = adapter_service.o
 
 AMD_DAL_ADAPTER = $(addprefix $(AMDDALPATH)/dc/adapter/,$(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
index 4c2c2fc164be..119b763b2e90 100644
--- a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
+++ b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
@@ -36,8 +36,6 @@
 
 #include "adapter_service.h"
 
-#include "wireless_data_source.h"
-
 #include "atom.h"
 
 #define ABSOLUTE_BACKLIGHT_MAX 255
@@ -475,10 +473,6 @@ static bool get_feature_value_from_data_sources(
 		*data = as->asic_cap->data[ASIC_DATA_STUTTERMODE];
 		break;
 
-	case FEATURE_WIRELESS_ENABLE:
-		*data = as->wireless_data.wireless_enable;
-		break;
-
 	case FEATURE_8BPP_SUPPORTED:
 		*data = as->asic_cap->caps.SUPPORT_8BPP;
 		break;
@@ -810,18 +804,6 @@ enum dce_version dal_adapter_service_get_dce_version(
 	}
 }
 
-static bool is_wireless_object(struct graphics_object_id id)
-{
-	if ((id.type == OBJECT_TYPE_ENCODER &&
-		id.id == ENCODER_ID_INTERNAL_WIRELESS) ||
-		(id.type == OBJECT_TYPE_CONNECTOR && id.id ==
-			CONNECTOR_ID_WIRELESS) ||
-		(id.type == OBJECT_TYPE_CONNECTOR && id.id ==
-			CONNECTOR_ID_MIRACAST))
-		return true;
-	return false;
-}
-
 /**
  * Get the source objects of an object
  *
@@ -841,17 +823,13 @@ struct graphics_object_id dal_adapter_service_get_src_obj(
 	struct graphics_object_id src_object_id;
 	struct dc_bios *dcb = as->ctx->dc_bios;
 
-	if (is_wireless_object(id))
-		src_object_id = wireless_get_src_obj_id(as, id, index);
-	else {
-		if (BP_RESULT_OK != dcb->funcs->get_src_obj(dcb, id, index,
-				&src_object_id)) {
-			src_object_id =
-				dal_graphics_object_id_init(
-					0,
-					ENUM_ID_UNKNOWN,
-					OBJECT_TYPE_UNKNOWN);
-		}
+	if (BP_RESULT_OK != dcb->funcs->get_src_obj(dcb, id, index,
+			&src_object_id)) {
+		src_object_id =
+			dal_graphics_object_id_init(
+				0,
+				ENUM_ID_UNKNOWN,
+				OBJECT_TYPE_UNKNOWN);
 	}
 
 	return src_object_id;
diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.h b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.h
index 957bc25c563c..0e651206af16 100644
--- a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.h
+++ b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.h
@@ -29,7 +29,6 @@
 /* Include */
 #include "dc_bios_types.h"
 #include "include/adapter_service_interface.h"
-#include "wireless_data_source.h"
 
 #define SIZEOF_BACKLIGHT_LUT 101
 
@@ -46,7 +45,6 @@ struct adapter_service {
 	enum dce_environment dce_environment;
 	struct gpio_service *gpio_service;
 	struct i2caux *i2caux;
-	struct wireless_data wireless_data;
 	struct integrated_info *integrated_info;
 	uint32_t platform_methods_mask;
 	uint32_t ac_level_percentage;
diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/wireless_data_source.c b/drivers/gpu/drm/amd/dal/dc/adapter/wireless_data_source.c
deleted file mode 100644
index 0b1151ec5a2c..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/adapter/wireless_data_source.c
+++ /dev/null
@@ -1,208 +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 "adapter_service.h"
-#include "wireless_data_source.h"
-
-#include "atom.h"
-
-/*construct wireless data*/
-bool wireless_data_init(struct wireless_data *data,
-		struct dc_bios *dcb,
-		struct wireless_init_data *init_data)
-{
-	struct firmware_info info;
-
-	if (data == NULL || dcb == NULL || init_data == NULL) {
-		ASSERT_CRITICAL(false);
-		return false;
-	}
-
-	data->miracast_connector_enable = false;
-	data->wireless_disp_path_enable = false;
-	data->wireless_enable = false;
-
-	/* Wireless it not supported if VCE is not supported */
-	if (!init_data->vce_supported)
-		return true;
-
-	if (init_data->miracast_target_required)
-		data->miracast_connector_enable = true;
-
-	/*
-	 * If override is in place for platform support, we will both
-	 * enable wireless display as a feature (i.e. CCC aspect) and
-	 * enable the wireless display path without any further checks.
-	 */
-	if (init_data->platform_override) {
-		data->wireless_enable = true;
-		data->wireless_disp_path_enable = true;
-	} else {
-		/*
-		 * Check if SBIOS sets remote display enable, exposed
-		 * through VBIOS. This is only valid for APU, not dGPU
-		 */
-		dcb->funcs->get_firmware_info(dcb, &info);
-
-		if ((REMOTE_DISPLAY_ENABLE == info.remote_display_config) &&
-				init_data->fusion) {
-			data->wireless_enable = true;
-			data->wireless_disp_path_enable = true;
-		}
-	}
-
-	/*
-	 * If remote display path override is enabled, we enable just the
-	 * remote display path. This is mainly used for testing purposes
-	 */
-	if (init_data->remote_disp_path_override)
-		data->wireless_disp_path_enable = true;
-
-	return true;
-}
-
-uint8_t wireless_get_clocks_num(
-	struct adapter_service *as)
-{
-	if (as->wireless_data.wireless_enable ||
-		as->wireless_data.wireless_disp_path_enable)
-		return 1;
-	else
-		return 0;
-}
-
-static uint8_t wireless_get_encoders_num(
-	struct adapter_service *as)
-{
-	if (as->wireless_data.wireless_enable ||
-		as->wireless_data.wireless_disp_path_enable)
-		return 1;
-	else
-		return 0;
-}
-
-uint8_t wireless_get_connectors_num(
-	struct adapter_service *as)
-{
-	uint8_t wireless_connectors_num = 0;
-
-	if (as->wireless_data.wireless_enable &&
-		as->wireless_data.miracast_connector_enable)
-		wireless_connectors_num++;
-
-	if (as->wireless_data.wireless_disp_path_enable)
-		wireless_connectors_num++;
-
-	return wireless_connectors_num;
-}
-
-struct graphics_object_id wireless_get_connector_id(
-	struct adapter_service *as,
-	uint8_t index)
-{
-	struct graphics_object_id unknown_object_id =
-			dal_graphics_object_id_init(
-				0,
-				ENUM_ID_UNKNOWN,
-				OBJECT_TYPE_UNKNOWN);
-
-	if (!as->wireless_data.wireless_enable &&
-		!as->wireless_data.wireless_disp_path_enable)
-		return unknown_object_id;
-
-	else if (!as->wireless_data.miracast_connector_enable)
-		return dal_graphics_object_id_init(
-			CONNECTOR_ID_WIRELESS,
-			ENUM_ID_1,
-			OBJECT_TYPE_CONNECTOR);
-
-	switch (index) {
-	case 0:
-		return dal_graphics_object_id_init(
-			CONNECTOR_ID_WIRELESS,
-			ENUM_ID_1,
-			OBJECT_TYPE_CONNECTOR);
-		break;
-	case 1:
-		return dal_graphics_object_id_init(
-			CONNECTOR_ID_MIRACAST,
-			ENUM_ID_1,
-			OBJECT_TYPE_CONNECTOR);
-		break;
-	default:
-		return unknown_object_id;
-	}
-}
-
-uint8_t wireless_get_srcs_num(
-	struct adapter_service *as,
-	struct graphics_object_id id)
-{
-	switch (id.type) {
-	case OBJECT_TYPE_CONNECTOR:
-		return wireless_get_encoders_num(as);
-	case OBJECT_TYPE_ENCODER:
-		return 1;
-
-	default:
-		ASSERT_CRITICAL(false);
-		break;
-	}
-
-	return 0;
-}
-
-struct graphics_object_id wireless_get_src_obj_id(
-	struct adapter_service *as,
-	struct graphics_object_id id,
-	uint8_t index)
-{
-	if (index < wireless_get_srcs_num(as, id)) {
-		switch (id.type) {
-		case OBJECT_TYPE_CONNECTOR:
-			return dal_graphics_object_id_init(
-					ENCODER_ID_INTERNAL_WIRELESS,
-					ENUM_ID_1,
-					OBJECT_TYPE_ENCODER);
-			break;
-		case OBJECT_TYPE_ENCODER:
-			return dal_graphics_object_id_init(
-					0,
-					ENUM_ID_1,
-					OBJECT_TYPE_GPU);
-			break;
-		default:
-			ASSERT_CRITICAL(false);
-			break;
-		}
-	}
-
-	return dal_graphics_object_id_init(
-			0,
-			ENUM_ID_UNKNOWN,
-			OBJECT_TYPE_UNKNOWN);
-}
diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/wireless_data_source.h b/drivers/gpu/drm/amd/dal/dc/adapter/wireless_data_source.h
deleted file mode 100644
index 972ada80cf65..000000000000
--- a/drivers/gpu/drm/amd/dal/dc/adapter/wireless_data_source.h
+++ /dev/null
@@ -1,79 +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_WIRELESS_DATA_SOURCE_H__
-#define __DAL_WIRELESS_DATA_SOURCE_H__
-
-/* Include */
-#include "include/grph_object_id.h"
-
-/*
- * Forward declaration
- */
-struct adapter_service;
-struct dc_bios;
-
-/* Wireless data init structure */
-struct wireless_init_data {
-	bool fusion; /* Fusion flag */
-	bool platform_override; /* Override for platform BIOS option */
-	bool remote_disp_path_override; /* Override enabling wireless path */
-	bool vce_supported; /* Existence of VCE block on this DCE */
-	bool miracast_target_required; /* OS requires Miracast target */
-};
-
-/* Wireless data */
-struct wireless_data {
-	bool wireless_enable;
-	bool wireless_disp_path_enable;
-	bool miracast_connector_enable;
-};
-
-/*construct wireless data*/
-bool wireless_data_init(
-	struct wireless_data *data,
-	struct dc_bios *dcb,
-	struct wireless_init_data *init_data);
-
-uint8_t wireless_get_clocks_num(
-	struct adapter_service *as);
-
-uint8_t wireless_get_connectors_num(
-	struct adapter_service *as);
-
-struct graphics_object_id wireless_get_connector_id(
-	struct adapter_service *as,
-	uint8_t connector_index);
-
-uint8_t wireless_get_srcs_num(
-	struct adapter_service *as,
-	struct graphics_object_id id);
-
-struct graphics_object_id wireless_get_src_obj_id(
-	struct adapter_service *as,
-	struct graphics_object_id id,
-	uint8_t index);
-
-#endif /* __DAL_WIRELESS_DATA_SOURCE_H__ */
-- 
2.10.1



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux