From 0fbccffaa6cc447843e521ce04cd48b3eb4045da Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 11 Apr 2016 17:42:31 +1000 Subject: [PATCH 1016/1110] drm/amd/dal: drop bios_power_down and unused set_scratch_lcd_scale API Drop dead code. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c | 16 ------------ .../gpu/drm/amd/dal/dc/bios/bios_parser_helper.c | 17 ------------- .../gpu/drm/amd/dal/dc/bios/bios_parser_helper.h | 3 --- .../dal/dc/bios/dce110/bios_parser_helper_dce110.c | 11 -------- .../dal/dc/bios/dce80/bios_parser_helper_dce80.c | 29 ---------------------- drivers/gpu/drm/amd/dal/dc/dc_bios_types.h | 3 --- 6 files changed, 79 deletions(-) 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 fe3cc60..91b7d2b 100644 --- a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c +++ b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser.c @@ -148,15 +148,6 @@ void dal_bios_parser_destroy(struct dc_bios **dcb) *dcb = NULL; } -void dc_bios_power_down(struct dc_bios *dcb) -{ -#if defined(CONFIG_DRM_AMD_DAL_VBIOS_PRESENT) - struct bios_parser *bp = BP_FROM_DCB(dcb); - - dal_bios_parser_set_scratch_lcd_scale(bp, bp->lcd_scale); -#endif -} - void dc_bios_power_up(struct dc_bios *dcb) { #if defined(CONFIG_DRM_AMD_DAL_VBIOS_PRESENT) @@ -4642,13 +4633,6 @@ static bool is_display_config_changed( return false; } -static void set_scratch_lcd_scale( - struct dc_bios *bios, - enum lcd_scale scale) -{ - BREAK_TO_DEBUGGER(); -} - static enum lcd_scale get_scratch_lcd_scale( struct dc_bios *bios) { diff --git a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.c b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.c index 4204798..af7a3b8 100644 --- a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.c +++ b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.c @@ -106,23 +106,6 @@ bool dal_bios_parser_is_display_config_changed( } /** -* dal_bios_parser_set_scratch_lcd_scale -* -* @brief -* update VBIOS scratch pad registers about LCD scale -* -* @param -* bool - to set to full panel mode or aspect-ratio mode -*/ -void dal_bios_parser_set_scratch_lcd_scale( - struct bios_parser *bp, - enum lcd_scale scale) -{ - bp->bios_helper->set_scratch_lcd_scale( - bp->ctx, scale); -} - -/** * dal_bios_parser_get_scratch_lcd_scale * * @brief diff --git a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.h b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.h index 124a11e..a8e10c9 100644 --- a/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.h +++ b/drivers/gpu/drm/amd/dal/dc/bios/bios_parser_helper.h @@ -72,9 +72,6 @@ struct bios_parser_helper { void (*set_scratch_active_and_requested)( struct dc_context *ctx, struct vbios_helper_data *d); - void (*set_scratch_lcd_scale)( - struct dc_context *ctx, - enum lcd_scale lcd_scale_request); enum lcd_scale (*get_scratch_lcd_scale)( struct dc_context *ctx); uint32_t (*fmt_control)( diff --git a/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c b/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c index 442e2a3..16a63ea 100644 --- a/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c +++ b/drivers/gpu/drm/amd/dal/dc/bios/dce110/bios_parser_helper_dce110.c @@ -326,16 +326,6 @@ void dce110_set_scratch_critical_state(struct dc_context *ctx, dm_write_reg(ctx, addr, value); } -static void set_scratch_lcd_scale( - struct dc_context *ctx, - enum lcd_scale lcd_scale_request) -{ - DAL_LOGGER_NOT_IMPL( - LOG_MINOR_COMPONENT_BIOS, - "Bios Parser:%s\n", - __func__); -} - static bool is_lid_open(struct dc_context *ctx) { uint32_t bios_scratch6; @@ -371,7 +361,6 @@ static const struct bios_parser_helper bios_parser_helper_funcs = { prepare_scratch_active_and_requested, .set_scratch_acc_mode_change = set_scratch_acc_mode_change, .set_scratch_active_and_requested = set_scratch_active_and_requested, - .set_scratch_lcd_scale = set_scratch_lcd_scale, .take_backlight_control = NULL, .update_requested_backlight_level = NULL, }; diff --git a/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c b/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c index 3963129..a7e42b5 100644 --- a/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c +++ b/drivers/gpu/drm/amd/dal/dc/bios/dce80/bios_parser_helper_dce80.c @@ -352,34 +352,6 @@ static void set_scratch_active_and_requested( d->requested = 0; } -static void set_scratch_lcd_scale( - struct dc_context *ctx, - enum lcd_scale lcd_scale_request) -{ - uint32_t reg; - - reg = dm_read_reg(ctx, mmBIOS_SCRATCH_6); - - reg &= ~ATOM_S6_REQ_LCD_EXPANSION_FULL; - reg &= ~ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO; - - switch (lcd_scale_request) { - case LCD_SCALE_FULLPANEL: - /* set Lcd Scale to Full Panel Mode */ - reg |= ATOM_S6_REQ_LCD_EXPANSION_FULL; - break; - case LCD_SCALE_ASPECTRATIO: - /* set Lcd Scale to Aspect-Ratio Mode */ - reg |= ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO; - break; - case LCD_SCALE_NONE: - default: - break; - } - - dm_write_reg(ctx, mmBIOS_SCRATCH_6, reg); -} - static enum lcd_scale get_scratch_lcd_scale( struct dc_context *ctx) { @@ -665,7 +637,6 @@ static const struct bios_parser_helper bios_parser_helper_funcs = { .set_scratch_acc_mode_change = set_scratch_acc_mode_change, .set_scratch_active_and_requested = set_scratch_active_and_requested, .set_scratch_critical_state = set_scratch_critical_state, - .set_scratch_lcd_scale = set_scratch_lcd_scale, .take_backlight_control = take_backlight_control, .update_requested_backlight_level = update_requested_backlight_level, }; diff --git a/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h b/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h index 7e37a72..a6fd93a 100644 --- a/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h +++ b/drivers/gpu/drm/amd/dal/dc/dc_bios_types.h @@ -40,7 +40,6 @@ uint8_t dc_bios_get_connectors_number(struct dc_bios *bios); -void dc_bios_power_down(struct dc_bios *bios); void dc_bios_power_up(struct dc_bios *bios); uint8_t dc_bios_get_encoders_number(struct dc_bios *bios); @@ -130,8 +129,6 @@ bool dc_bios_is_lid_open(struct dc_bios *bios); bool dc_bios_is_lid_status_changed(struct dc_bios *bios); bool dc_bios_is_display_config_changed(struct dc_bios *bios); -void dc_bios_set_scratch_lcd_scale(struct dc_bios *bios, - enum lcd_scale scale); enum lcd_scale dc_bios_get_scratch_lcd_scale(struct dc_bios *bios); void dc_bios_get_bios_event_info(struct dc_bios *bios, struct bios_event_info *info); -- 2.7.4