From 5d15ae23f8a42ce6728294808b6bd96c6b251a5f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 3 Oct 2017 15:11:02 +1000 Subject: [PATCH] amdgpu/dc: kill a bunch of dead code. None of this code is used currently. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher --- 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 2dcff41c9b38..d8820d6f79c6 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 d02dd9f2ef09..4a70948c91b1 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 b3bbafc8fd6a..3d620d3d0672 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 @@ alloc_fail: 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.30.2