[PATCH 4/4] amdgpu/dc: kill a bunch of dead code.

Dave Airlie airlied at gmail.com
Tue Oct 3 05:11:02 UTC 2017


From: Dave Airlie <airlied at redhat.com>

None of this code is used currently.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 101 --------------------------
 drivers/gpu/drm/amd/display/dc/core/dc_link.c |  15 ----
 drivers/gpu/drm/amd/display/dc/core/dc_sink.c |  34 ---------
 3 files changed, 150 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 26b7207..f41f15f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1559,107 +1559,6 @@ void dc_resume(struct dc *dc)
 		core_link_resume(dc->links[i]);
 }
 
-bool dc_read_aux_dpcd(
-		struct dc *dc,
-		uint32_t link_index,
-		uint32_t address,
-		uint8_t *data,
-		uint32_t size)
-{
-
-	struct dc_link *link = dc->links[link_index];
-	enum ddc_result r = dal_ddc_service_read_dpcd_data(
-			link->ddc,
-			false,
-			I2C_MOT_UNDEF,
-			address,
-			data,
-			size);
-	return r == DDC_RESULT_SUCESSFULL;
-}
-
-bool dc_write_aux_dpcd(
-		struct dc *dc,
-		uint32_t link_index,
-		uint32_t address,
-		const uint8_t *data,
-		uint32_t size)
-{
-	struct dc_link *link = dc->links[link_index];
-
-	enum ddc_result r = dal_ddc_service_write_dpcd_data(
-			link->ddc,
-			false,
-			I2C_MOT_UNDEF,
-			address,
-			data,
-			size);
-	return r == DDC_RESULT_SUCESSFULL;
-}
-
-bool dc_read_aux_i2c(
-		struct dc *dc,
-		uint32_t link_index,
-		enum i2c_mot_mode mot,
-		uint32_t address,
-		uint8_t *data,
-		uint32_t size)
-{
-
-		struct dc_link *link = dc->links[link_index];
-		enum ddc_result r = dal_ddc_service_read_dpcd_data(
-			link->ddc,
-			true,
-			mot,
-			address,
-			data,
-			size);
-		return r == DDC_RESULT_SUCESSFULL;
-}
-
-bool dc_write_aux_i2c(
-		struct dc *dc,
-		uint32_t link_index,
-		enum i2c_mot_mode mot,
-		uint32_t address,
-		const uint8_t *data,
-		uint32_t size)
-{
-	struct dc_link *link = dc->links[link_index];
-
-	enum ddc_result r = dal_ddc_service_write_dpcd_data(
-			link->ddc,
-			true,
-			mot,
-			address,
-			data,
-			size);
-	return r == DDC_RESULT_SUCESSFULL;
-}
-
-bool dc_query_ddc_data(
-		struct dc *dc,
-		uint32_t link_index,
-		uint32_t address,
-		uint8_t *write_buf,
-		uint32_t write_size,
-		uint8_t *read_buf,
-		uint32_t read_size) {
-
-
-	struct dc_link *link = dc->links[link_index];
-
-	bool result = dal_ddc_service_query_ddc_data(
-			link->ddc,
-			address,
-			write_buf,
-			write_size,
-			read_buf,
-			read_size);
-
-	return result;
-}
-
 bool dc_submit_i2c(
 		struct dc *dc,
 		uint32_t link_index,
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index d02dd9f..4a70948 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -1857,21 +1857,6 @@ bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level,
 	return true;
 }
 
-
-bool dc_link_set_abm_disable(const struct dc_link *link)
-{
-	struct dc  *core_dc = link->ctx->dc;
-	struct abm *abm = core_dc->res_pool->abm;
-
-	if ((abm == NULL) || (abm->funcs->set_backlight_level == NULL))
-		return false;
-
-	abm->funcs->set_abm_immediate_disable(abm);
-
-	return true;
-}
-
-
 bool dc_link_set_psr_enable(const struct dc_link *link, bool enable, bool wait)
 {
 	struct dc  *core_dc = link->ctx->dc;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_sink.c b/drivers/gpu/drm/amd/display/dc/core/dc_sink.c
index f2b2e82..25fae38 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_sink.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_sink.c
@@ -99,40 +99,6 @@ struct dc_sink *dc_sink_create(const struct dc_sink_init_data *init_params)
 	return NULL;
 }
 
-bool dc_sink_get_container_id(struct dc_sink *dc_sink, struct dc_container_id *container_id)
-{
-	if (dc_sink && container_id && dc_sink->dc_container_id) {
-		memmove(&container_id->guid, &dc_sink->dc_container_id->guid,
-			sizeof(container_id->guid));
-		memmove(&container_id->portId, &dc_sink->dc_container_id->portId,
-			sizeof(container_id->portId));
-		container_id->manufacturerName = dc_sink->dc_container_id->manufacturerName;
-		container_id->productCode = dc_sink->dc_container_id->productCode;
-		return true;
-	}
-	return false;
-}
-
-bool dc_sink_set_container_id(struct dc_sink *dc_sink, const struct dc_container_id *container_id)
-{
-	if (dc_sink && container_id) {
-		if (!dc_sink->dc_container_id)
-			dc_sink->dc_container_id = kzalloc(sizeof(*dc_sink->dc_container_id),
-							   GFP_KERNEL);
-
-		if (dc_sink->dc_container_id) {
-			memmove(&dc_sink->dc_container_id->guid, &container_id->guid,
-				sizeof(container_id->guid));
-			memmove(&dc_sink->dc_container_id->portId, &container_id->portId,
-				sizeof(container_id->portId));
-			dc_sink->dc_container_id->manufacturerName = container_id->manufacturerName;
-			dc_sink->dc_container_id->productCode = container_id->productCode;
-			return true;
-		}
-	}
-	return false;
-}
-
 /*******************************************************************************
  * Protected functions - visible only inside of DC (not visible in DM)
  ******************************************************************************/
-- 
2.9.5



More information about the amd-gfx mailing list