[PATCH 50/76] drm/amd/dal: remove adapter_service dependency

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


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

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/core/dc.c                    |  6 +-----
 drivers/gpu/drm/amd/dal/dc/core/dc_link.c               | 14 +++++---------
 drivers/gpu/drm/amd/dal/dc/core/dc_link_ddc.c           |  1 -
 drivers/gpu/drm/amd/dal/dc/core/dc_resource.c           | 10 +++++-----
 drivers/gpu/drm/amd/dal/dc/dc_ddc_types.h               |  1 -
 drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c     |  7 +------
 drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.h     |  2 --
 drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.h |  1 -
 drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input_v.c  |  1 -
 drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.c     |  9 ++-------
 drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.h     |  2 --
 drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.c     |  9 +--------
 drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.h     |  2 --
 drivers/gpu/drm/amd/dal/dc/dce80/dce80_mem_input.c      |  1 -
 drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c       |  8 ++------
 drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.h       |  2 --
 drivers/gpu/drm/amd/dal/dc/i2caux/i2caux.c              |  1 +
 drivers/gpu/drm/amd/dal/dc/inc/core_types.h             |  3 ---
 drivers/gpu/drm/amd/dal/dc/inc/dc_link_ddc.h            |  2 --
 drivers/gpu/drm/amd/dal/dc/inc/hw/link_encoder.h        |  2 --
 drivers/gpu/drm/amd/dal/dc/inc/resource.h               |  2 +-
 drivers/gpu/drm/amd/dal/include/i2caux_interface.h      |  1 -
 drivers/gpu/drm/amd/dal/include/link_service_types.h    |  1 -
 23 files changed, 19 insertions(+), 69 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c
index c5f98525a630..a3c9cb3e1249 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c
@@ -72,7 +72,6 @@ static void destroy_links(struct core_dc *dc)
 
 static bool create_links(
 		struct core_dc *dc,
-		struct adapter_service *as,
 		uint32_t num_virtual_links)
 {
 	int i;
@@ -106,7 +105,6 @@ static bool create_links(
 		struct core_link *link;
 
 		link_init_params.ctx = dc->ctx;
-		link_init_params.adapter_srv = as;
 		link_init_params.connector_index = i;
 		link_init_params.link_index = dc->link_count;
 		link_init_params.dc = dc;
@@ -130,7 +128,6 @@ static bool create_links(
 			goto failed_alloc;
 		}
 
-		link->adapter_srv = as;
 		link->ctx = dc->ctx;
 		link->dc = dc;
 		link->public.connector_signal = SIGNAL_TYPE_VIRTUAL;
@@ -604,7 +601,6 @@ static bool construct(struct core_dc *dc,
 	}
 
 	dc->res_pool = dc_create_resource_pool(
-			as,
 			dc,
 			init_params->num_virtual_links,
 			dc_version,
@@ -612,7 +608,7 @@ static bool construct(struct core_dc *dc,
 	if (!dc->res_pool)
 		goto create_resource_fail;
 
-	if (!create_links(dc, as, init_params->num_virtual_links))
+	if (!create_links(dc, init_params->num_virtual_links))
 		goto create_links_fail;
 
 	allocate_dc_stream_funcs(dc);
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 e59e439a35e7..af5fb0fc4c3e 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
@@ -787,8 +787,7 @@ bool dc_link_detect(const struct dc_link *dc_link, bool boot)
 }
 
 static enum hpd_source_id get_hpd_line(
-		struct core_link *link,
-		struct adapter_service *as)
+		struct core_link *link)
 {
 	struct gpio *hpd;
 	enum hpd_source_id hpd_id = HPD_SOURCEID_UNKNOWN;
@@ -826,7 +825,7 @@ static enum hpd_source_id get_hpd_line(
 	return hpd_id;
 }
 
-static enum channel_id get_ddc_line(struct core_link *link, struct adapter_service *as)
+static enum channel_id get_ddc_line(struct core_link *link)
 {
 	struct ddc *ddc;
 	enum channel_id channel = CHANNEL_ID_UNKNOWN;
@@ -938,7 +937,6 @@ static bool construct(
 	const struct link_init_data *init_params)
 {
 	uint8_t i;
-	struct adapter_service *as = init_params->adapter_srv;
 	struct gpio *hpd_gpio = NULL;
 	struct ddc_service_init_data ddc_service_init_data = { 0 };
 	struct dc_context *dc_ctx = init_params->ctx;
@@ -953,7 +951,6 @@ static bool construct(
 	link->link_status.dpcd_caps = &link->dpcd_caps;
 
 	link->dc = init_params->dc;
-	link->adapter_srv = as;
 	link->ctx = dc_ctx;
 	link->public.link_index = init_params->link_index;
 
@@ -1017,7 +1014,6 @@ static bool construct(
 			init_params->connector_index,
 			link->public.connector_signal);
 
-	ddc_service_init_data.as = as;
 	ddc_service_init_data.ctx = link->ctx;
 	ddc_service_init_data.id = link->link_id;
 	ddc_service_init_data.link = link;
@@ -1035,8 +1031,8 @@ static bool construct(
 	enc_init_data.ctx = dc_ctx;
 	bp_funcs->get_src_obj(dc_ctx->dc_bios, link->link_id, 0, &enc_init_data.encoder);
 	enc_init_data.connector = link->link_id;
-	enc_init_data.channel = get_ddc_line(link, as);
-	enc_init_data.hpd_source = get_hpd_line(link, as);
+	enc_init_data.channel = get_ddc_line(link);
+	enc_init_data.hpd_source = get_hpd_line(link);
 	enc_init_data.transmitter =
 			translate_encoder_to_transmitter(enc_init_data.encoder);
 	link->link_enc = link->dc->res_pool->funcs->link_enc_create(
@@ -1562,7 +1558,7 @@ bool dc_link_setup_psr(const struct dc_link *dc_link,
 			dc_link->psr_caps.psr_frame_capture_indication_req;
 
 		psr_context.skipPsrWaitForPllLock =
-				link->link_enc->adapter_service->
+				ctx->adapter_srv->
 				asic_cap->caps.SKIP_PSR_WAIT_FOR_PLL_LOCK_BIT;
 
 		psr_context.numberOfControllers =
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 c945d4b27def..6be8e08e3d99 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
@@ -287,7 +287,6 @@ static bool construct(
 
 	ddc_service->link = init_data->link;
 	ddc_service->ctx = init_data->ctx;
-	ddc_service->as = init_data->as;
 
 	if (BP_RESULT_OK != dcb->funcs->get_i2c_info(dcb, init_data->id, &i2c_info)) {
 		ddc_service->ddc_pin = NULL;
diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
index a4061c68596a..4e76d5dbbac0 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
@@ -72,7 +72,7 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)
 	return dc_version;
 }
 
-struct resource_pool *dc_create_resource_pool(struct adapter_service *adapter_serv,
+struct resource_pool *dc_create_resource_pool(
 				struct core_dc *dc,
 				int num_virtual_links,
 				enum dce_version dc_version,
@@ -82,16 +82,16 @@ struct resource_pool *dc_create_resource_pool(struct adapter_service *adapter_se
 	switch (dc_version) {
 	case DCE_VERSION_8_0:
 		return dce80_create_resource_pool(
-			adapter_serv, num_virtual_links, dc);
+			num_virtual_links, dc);
 	case DCE_VERSION_10_0:
 		return dce100_create_resource_pool(
-			adapter_serv, num_virtual_links, dc);
+				num_virtual_links, dc);
 	case DCE_VERSION_11_0:
 		return dce110_create_resource_pool(
-			adapter_serv, num_virtual_links, dc, asic_id);
+			num_virtual_links, dc, asic_id);
 	case DCE_VERSION_11_2:
 		return dce112_create_resource_pool(
-			adapter_serv, num_virtual_links, dc);
+			num_virtual_links, dc);
 	default:
 		break;
 	}
diff --git a/drivers/gpu/drm/amd/dal/dc/dc_ddc_types.h b/drivers/gpu/drm/amd/dal/dc/dc_ddc_types.h
index 91fa86ec44e3..b143fe88f49f 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc_ddc_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc_ddc_types.h
@@ -104,7 +104,6 @@ struct ddc_service {
 	union ddc_wa wa;
 	enum ddc_transaction_type transaction_type;
 	enum display_dongle_type dongle_type;
-	struct adapter_service *as;
 	struct dc_context *ctx;
 	struct core_link *link;
 
diff --git a/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c
index feb922836e82..9062ca209fd9 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c
@@ -407,7 +407,6 @@ static struct audio *create_audio(
 }
 
 static struct timing_generator *dce100_timing_generator_create(
-		struct adapter_service *as,
 		struct dc_context *ctx,
 		uint32_t instance,
 		const struct dce110_timing_generator_offsets *offsets)
@@ -859,7 +858,6 @@ static const struct resource_funcs dce100_res_pool_funcs = {
 };
 
 static bool construct(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc,
 	struct dce110_resource_pool *pool)
@@ -872,7 +870,6 @@ static bool construct(
 
 	ctx->dc_bios->regs = &bios_regs;
 
-	pool->base.adapter_srv = as;
 	pool->base.res_cap = &res_cap;
 	pool->base.funcs = &dce100_res_pool_funcs;
 	pool->base.underlay_pipe_index = -1;
@@ -962,7 +959,6 @@ static bool construct(
 	for (i = 0; i < pool->base.pipe_count; i++) {
 		pool->base.timing_generators[i] =
 			dce100_timing_generator_create(
-				as,
 				ctx,
 				i,
 				&dce100_tg_offsets[i]);
@@ -1028,7 +1024,6 @@ res_create_fail:
 }
 
 struct resource_pool *dce100_create_resource_pool(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc)
 {
@@ -1038,7 +1033,7 @@ struct resource_pool *dce100_create_resource_pool(
 	if (!pool)
 		return NULL;
 
-	if (construct(as, num_virtual_links, dc, pool))
+	if (construct(num_virtual_links, dc, pool))
 		return &pool->base;
 
 	BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.h b/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.h
index 24af9bf4a6ae..bfd7518c94c9 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.h
+++ b/drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.h
@@ -8,13 +8,11 @@
 #ifndef DCE100_RESOURCE_H_
 #define DCE100_RESOURCE_H_
 
-struct adapter_service;
 struct core_dc;
 struct resource_pool;
 struct dc_validation_set;
 
 struct resource_pool *dce100_create_resource_pool(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc);
 
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.h b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.h
index 4405bdbb3bb8..a6b4d0d2429f 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.h
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.h
@@ -27,7 +27,6 @@
 #define __DC_HWSS_DCE110_H__
 
 #include "core_types.h"
-#include "adapter_service_interface.h"
 
 #define GAMMA_HW_POINTS_NUM 256
 struct core_dc;
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input_v.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input_v.c
index acf200ba16b1..f0310bab4030 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input_v.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_mem_input_v.c
@@ -31,7 +31,6 @@
 #include "gmc/gmc_8_2_sh_mask.h"
 
 #include "include/logger_interface.h"
-#include "adapter_service_interface.h"
 #include "inc/bandwidth_calcs.h"
 
 #include "dce110_mem_input.h"
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.c
index 28d389c0ead5..8a840d3b86d7 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.c
@@ -47,7 +47,6 @@
 #include "dce110/dce110_opp_v.h"
 #include "dce110/dce110_clock_source.h"
 #include "dce110/dce110_hw_sequencer.h"
-#include "adapter_service_interface.h"
 
 #include "reg_helper.h"
 
@@ -384,7 +383,6 @@ static struct audio *create_audio(
 }
 
 static struct timing_generator *dce110_timing_generator_create(
-		struct adapter_service *as,
 		struct dc_context *ctx,
 		uint32_t instance,
 		const struct dce110_timing_generator_offsets *offsets)
@@ -1174,7 +1172,6 @@ const struct resource_caps *dce110_resource_cap(
 }
 
 static bool construct(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc,
 	struct dce110_resource_pool *pool,
@@ -1189,7 +1186,6 @@ static bool construct(
 
 	ctx->dc_bios->regs = &bios_regs;
 
-	pool->base.adapter_srv = as;
 	pool->base.res_cap = dce110_resource_cap(&ctx->asic_id);
 	pool->base.funcs = &dce110_res_pool_funcs;
 
@@ -1274,7 +1270,7 @@ static bool construct(
 
 	for (i = 0; i < pool->base.pipe_count; i++) {
 		pool->base.timing_generators[i] = dce110_timing_generator_create(
-				as, ctx, i, &dce110_tg_offsets[i]);
+				ctx, i, &dce110_tg_offsets[i]);
 		if (pool->base.timing_generators[i] == NULL) {
 			BREAK_TO_DEBUGGER();
 			dm_error("DC: failed to create tg!\n");
@@ -1341,7 +1337,6 @@ res_create_fail:
 }
 
 struct resource_pool *dce110_create_resource_pool(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc,
 	struct hw_asic_id asic_id)
@@ -1352,7 +1347,7 @@ struct resource_pool *dce110_create_resource_pool(
 	if (!pool)
 		return NULL;
 
-	if (construct(as, num_virtual_links, dc, pool, asic_id))
+	if (construct(num_virtual_links, dc, pool, asic_id))
 		return &pool->base;
 
 	BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.h b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.h
index 95c5873e9e88..535623aa0052 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.h
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.h
@@ -28,7 +28,6 @@
 
 #include "core_types.h"
 
-struct adapter_service;
 struct core_dc;
 struct resource_pool;
 
@@ -49,7 +48,6 @@ void dce110_resource_build_bit_depth_reduction_params(
 		struct bit_depth_reduction_params *fmt_bit_depth);
 
 struct resource_pool *dce110_create_resource_pool(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc,
 	struct hw_asic_id asic_id);
diff --git a/drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.c
index 92fcd4eeb5bf..578d8fd89d39 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.c
@@ -433,7 +433,6 @@ static struct audio *create_audio(
 
 
 static struct timing_generator *dce112_timing_generator_create(
-		struct adapter_service *as,
 		struct dc_context *ctx,
 		uint32_t instance,
 		const struct dce110_timing_generator_offsets *offsets)
@@ -480,7 +479,6 @@ static const struct resource_create_funcs res_create_funcs = {
 
 static struct mem_input *dce112_mem_input_create(
 	struct dc_context *ctx,
-	struct adapter_service *as,
 	uint32_t inst,
 	const struct dce110_mem_input_reg_offsets *offset)
 {
@@ -1190,7 +1188,6 @@ const struct resource_caps *dce112_resource_cap(
 }
 
 static bool construct(
-	struct adapter_service *adapter_serv,
 	uint8_t num_virtual_links,
 	struct core_dc *dc,
 	struct dce110_resource_pool *pool)
@@ -1201,7 +1198,6 @@ static bool construct(
 
 	ctx->dc_bios->regs = &bios_regs;
 
-	pool->base.adapter_srv = adapter_serv;
 	pool->base.res_cap = dce112_resource_cap(&ctx->asic_id);
 	pool->base.funcs = &dce112_res_pool_funcs;
 
@@ -1302,7 +1298,6 @@ static bool construct(
 	for (i = 0; i < pool->base.pipe_count; i++) {
 		pool->base.timing_generators[i] =
 				dce112_timing_generator_create(
-					adapter_serv,
 					ctx,
 					i,
 					&dce112_tg_offsets[i]);
@@ -1314,7 +1309,6 @@ static bool construct(
 
 		pool->base.mis[i] = dce112_mem_input_create(
 			ctx,
-			adapter_serv,
 			i,
 			&dce112_mi_reg_offsets[i]);
 		if (pool->base.mis[i] == NULL) {
@@ -1381,7 +1375,6 @@ res_create_fail:
 }
 
 struct resource_pool *dce112_create_resource_pool(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc)
 {
@@ -1391,7 +1384,7 @@ struct resource_pool *dce112_create_resource_pool(
 	if (!pool)
 		return NULL;
 
-	if (construct(as, num_virtual_links, dc, pool))
+	if (construct(num_virtual_links, dc, pool))
 		return &pool->base;
 
 	BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.h b/drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.h
index 324b3d73fe70..9d2427752389 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.h
+++ b/drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.h
@@ -28,12 +28,10 @@
 
 #include "core_types.h"
 
-struct adapter_service;
 struct core_dc;
 struct resource_pool;
 
 struct resource_pool *dce112_create_resource_pool(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc);
 
diff --git a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_mem_input.c b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_mem_input.c
index 5d84a9bc5f9f..078a608dc737 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_mem_input.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_mem_input.c
@@ -31,7 +31,6 @@
 #include "gmc/gmc_7_1_sh_mask.h"
 
 #include "include/logger_interface.h"
-#include "adapter_service_interface.h"
 #include "inc/bandwidth_calcs.h"
 
 #include "../dce110/dce110_mem_input.h"
diff --git a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c
index 42b5ccdb3508..7bf277e7bada 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c
@@ -399,7 +399,6 @@ static struct audio *create_audio(
 }
 
 static struct timing_generator *dce80_timing_generator_create(
-		struct adapter_service *as,
 		struct dc_context *ctx,
 		uint32_t instance,
 		const struct dce110_timing_generator_offsets *offsets)
@@ -851,7 +850,6 @@ static enum clocks_state dce80_resource_convert_clock_state_pp_to_dc(
 }
 
 static bool construct(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc,
 	struct dce110_resource_pool *pool)
@@ -864,7 +862,6 @@ static bool construct(
 
 	ctx->dc_bios->regs = &bios_regs;
 
-	pool->base.adapter_srv = as;
 	pool->base.res_cap = &res_cap;
 	pool->base.funcs = &dce80_res_pool_funcs;
 
@@ -955,7 +952,7 @@ static bool construct(
 
 	for (i = 0; i < pool->base.pipe_count; i++) {
 		pool->base.timing_generators[i] = dce80_timing_generator_create(
-				as, ctx, i, &dce80_tg_offsets[i]);
+				ctx, i, &dce80_tg_offsets[i]);
 		if (pool->base.timing_generators[i] == NULL) {
 			BREAK_TO_DEBUGGER();
 			dm_error("DC: failed to create tg!\n");
@@ -1012,7 +1009,6 @@ res_create_fail:
 }
 
 struct resource_pool *dce80_create_resource_pool(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc)
 {
@@ -1022,7 +1018,7 @@ struct resource_pool *dce80_create_resource_pool(
 	if (!pool)
 		return NULL;
 
-	if (construct(as, num_virtual_links, dc, pool))
+	if (construct(num_virtual_links, dc, pool))
 		return &pool->base;
 
 	BREAK_TO_DEBUGGER();
diff --git a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.h b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.h
index 46b0f1d7a62f..2a0cdccddeaf 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.h
+++ b/drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.h
@@ -28,12 +28,10 @@
 
 #include "core_types.h"
 
-struct adapter_service;
 struct core_dc;
 struct resource_pool;
 
 struct resource_pool *dce80_create_resource_pool(
-	struct adapter_service *as,
 	uint8_t num_virtual_links,
 	struct core_dc *dc);
 
diff --git a/drivers/gpu/drm/amd/dal/dc/i2caux/i2caux.c b/drivers/gpu/drm/amd/dal/dc/i2caux/i2caux.c
index 63ffd7cb418d..5391655af23a 100644
--- a/drivers/gpu/drm/amd/dal/dc/i2caux/i2caux.c
+++ b/drivers/gpu/drm/amd/dal/dc/i2caux/i2caux.c
@@ -29,6 +29,7 @@
  * Pre-requisites: headers required by header of this unit
  */
 #include "include/i2caux_interface.h"
+#include "dc_bios_types.h"
 
 /*
  * Header of this unit
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
index 4ed88728a54d..3fca7ec3cec8 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
@@ -127,7 +127,6 @@ struct link_init_data {
 	uint32_t connector_index; /* this will be mapped to the HPD pins */
 	uint32_t link_index; /* this is mapped to DAL display_index
 				TODO: remove it when DC is complete. */
-	struct adapter_service *adapter_srv;
 };
 
 /* DP MST stream allocation (payload bandwidth number) */
@@ -155,7 +154,6 @@ struct core_link {
 
 	struct dc_context *ctx; /* TODO: AUTO remove 'dal' when DC is complete*/
 
-	struct adapter_service *adapter_srv;
 	struct link_encoder *link_enc;
 	struct ddc_service *ddc;
 	struct graphics_object_id link_id;
@@ -264,7 +262,6 @@ struct resource_pool {
 	struct audio_support audio_support;
 
 	struct display_clock *display_clock;
-	struct adapter_service *adapter_srv;
 	struct irq_service *irqs;
 
 	const struct resource_funcs *funcs;
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/dc_link_ddc.h b/drivers/gpu/drm/amd/dal/dc/inc/dc_link_ddc.h
index e5daeb945bac..830fc3d039c9 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/dc_link_ddc.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/dc_link_ddc.h
@@ -32,7 +32,6 @@
 #define EDID_SEGMENT_SIZE 256
 
 struct ddc_service;
-struct adapter_service;
 struct graphics_object_id;
 enum ddc_result;
 struct av_sync_data;
@@ -66,7 +65,6 @@ void dal_ddc_aux_payloads_add(
 		bool write);
 
 struct ddc_service_init_data {
-	struct adapter_service *as;
 	struct graphics_object_id id;
 	struct dc_context *ctx;
 	struct core_link *link;
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/hw/link_encoder.h b/drivers/gpu/drm/amd/dal/dc/inc/hw/link_encoder.h
index edef4a41fe4f..77f8aa410898 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/hw/link_encoder.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/hw/link_encoder.h
@@ -13,7 +13,6 @@
 #include "dc_types.h"
 
 struct dc_context;
-struct adapter_service;
 struct encoder_set_dp_phy_pattern_param;
 struct link_mst_stream_allocation_table;
 struct dc_link_settings;
@@ -201,7 +200,6 @@ struct psr_dmcu_context {
 
 struct link_encoder {
 	const struct link_encoder_funcs *funcs;
-	struct adapter_service *adapter_service;
 	int32_t aux_channel_offset;
 	struct dc_context *ctx;
 	struct graphics_object_id id;
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/resource.h b/drivers/gpu/drm/amd/dal/dc/inc/resource.h
index 4e64e45e897b..9606cb28cd62 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/resource.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/resource.h
@@ -69,7 +69,7 @@ bool resource_construct(
 	struct resource_pool *pool,
 	const struct resource_create_funcs *create_funcs);
 
-struct resource_pool *dc_create_resource_pool(struct adapter_service *adapter_serv,
+struct resource_pool *dc_create_resource_pool(
 				struct core_dc *dc,
 				int num_virtual_links,
 				enum dce_version dc_version,
diff --git a/drivers/gpu/drm/amd/dal/include/i2caux_interface.h b/drivers/gpu/drm/amd/dal/include/i2caux_interface.h
index a78576a38b36..d2ec04d1c592 100644
--- a/drivers/gpu/drm/amd/dal/include/i2caux_interface.h
+++ b/drivers/gpu/drm/amd/dal/include/i2caux_interface.h
@@ -26,7 +26,6 @@
 #ifndef __DAL_I2CAUX_INTERFACE_H__
 #define __DAL_I2CAUX_INTERFACE_H__
 
-#include "adapter_service_interface.h"
 #include "gpio_service_interface.h"
 
 
diff --git a/drivers/gpu/drm/amd/dal/include/link_service_types.h b/drivers/gpu/drm/amd/dal/include/link_service_types.h
index 96e6b38aa9f9..06e68426d430 100644
--- a/drivers/gpu/drm/amd/dal/include/link_service_types.h
+++ b/drivers/gpu/drm/amd/dal/include/link_service_types.h
@@ -162,7 +162,6 @@ struct link_service_init_data {
 	struct link_service_init_options init_options;
 	uint32_t connector_enum_id;
 	struct graphics_object_id connector_id;
-	struct adapter_service *adapter_service;
 	struct dc_context *ctx;
 	struct topology_mgr *tm;
 };
-- 
2.10.1



More information about the amd-gfx mailing list