Commit 3639fa68 authored by Zeyu Fan's avatar Zeyu Fan Committed by Alex Deucher

drm/amd/display: Clean up some DCN1 guards

Signed-off-by: default avatarZeyu Fan <Zeyu.Fan@amd.com>
Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f4d5abf5
...@@ -58,6 +58,7 @@ bool dal_bios_parser_init_cmd_tbl_helper2( ...@@ -58,6 +58,7 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
*h = dal_cmd_tbl_helper_dce112_get_table2(); *h = dal_cmd_tbl_helper_dce112_get_table2();
return true; return true;
#endif #endif
case DCE_VERSION_12_0: case DCE_VERSION_12_0:
*h = dal_cmd_tbl_helper_dce112_get_table2(); *h = dal_cmd_tbl_helper_dce112_get_table2();
return true; return true;
......
...@@ -1109,7 +1109,7 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) ...@@ -1109,7 +1109,7 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
/* 3rd param should be true, temp w/a for RV*/ /* 3rd param should be true, temp w/a for RV*/
#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
core_dc->hwss.set_bandwidth(core_dc, context, core_dc->ctx->dce_version != DCN_VERSION_1_0); core_dc->hwss.set_bandwidth(core_dc, context, core_dc->ctx->dce_version < DCN_VERSION_1_0);
#else #else
core_dc->hwss.set_bandwidth(core_dc, context, true); core_dc->hwss.set_bandwidth(core_dc, context, true);
#endif #endif
......
...@@ -120,6 +120,8 @@ struct resource_pool *dc_create_resource_pool( ...@@ -120,6 +120,8 @@ struct resource_pool *dc_create_resource_pool(
num_virtual_links, dc); num_virtual_links, dc);
break; break;
#endif #endif
default: default:
break; break;
} }
......
...@@ -589,6 +589,7 @@ static uint32_t dce110_get_pix_clk_dividers( ...@@ -589,6 +589,7 @@ static uint32_t dce110_get_pix_clk_dividers(
#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
case DCN_VERSION_1_0: case DCN_VERSION_1_0:
#endif #endif
dce112_get_pix_clk_dividers_helper(clk_src, dce112_get_pix_clk_dividers_helper(clk_src,
pll_settings, pix_clk_params); pll_settings, pix_clk_params);
break; break;
...@@ -901,6 +902,7 @@ static bool dce110_program_pix_clk( ...@@ -901,6 +902,7 @@ static bool dce110_program_pix_clk(
#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
case DCN_VERSION_1_0: case DCN_VERSION_1_0:
#endif #endif
if (clock_source->id != CLOCK_SOURCE_ID_DP_DTO) { if (clock_source->id != CLOCK_SOURCE_ID_DP_DTO) {
bp_pc_params.flags.SET_GENLOCK_REF_DIV_SRC = bp_pc_params.flags.SET_GENLOCK_REF_DIV_SRC =
pll_settings->use_external_clk; pll_settings->use_external_clk;
......
...@@ -614,7 +614,7 @@ static bool dce_apply_clock_voltage_request( ...@@ -614,7 +614,7 @@ static bool dce_apply_clock_voltage_request(
} }
if (send_request) { if (send_request) {
#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
if (clk->ctx->dce_version == DCN_VERSION_1_0) { if (clk->ctx->dce_version >= DCN_VERSION_1_0) {
struct core_dc *core_dc = DC_TO_CORE(clk->ctx->dc); struct core_dc *core_dc = DC_TO_CORE(clk->ctx->dc);
/*use dcfclk request voltage*/ /*use dcfclk request voltage*/
clock_voltage_req.clk_type = DM_PP_CLOCK_TYPE_DCFCLK; clock_voltage_req.clk_type = DM_PP_CLOCK_TYPE_DCFCLK;
......
...@@ -1104,11 +1104,11 @@ static enum dc_status apply_single_controller_ctx_to_hw( ...@@ -1104,11 +1104,11 @@ static enum dc_status apply_single_controller_ctx_to_hw(
true : false); true : false);
resource_build_info_frame(pipe_ctx); resource_build_info_frame(pipe_ctx);
dce110_update_info_frame(pipe_ctx);
if (!pipe_ctx_old->stream) { if (!pipe_ctx_old->stream) {
core_link_enable_stream(pipe_ctx); core_link_enable_stream(pipe_ctx);
dce110_update_info_frame(pipe_ctx);
if (dc_is_dp_signal(pipe_ctx->stream->signal)) if (dc_is_dp_signal(pipe_ctx->stream->signal))
dce110_unblank_stream(pipe_ctx, dce110_unblank_stream(pipe_ctx,
&stream->sink->link->cur_link_settings); &stream->sink->link->cur_link_settings);
...@@ -1664,7 +1664,7 @@ enum dc_status dce110_apply_ctx_to_hw( ...@@ -1664,7 +1664,7 @@ enum dc_status dce110_apply_ctx_to_hw(
apply_min_clocks(dc, context, &clocks_state, true); apply_min_clocks(dc, context, &clocks_state, true);
#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
if (dc->ctx->dce_version == DCN_VERSION_1_0) { if (dc->ctx->dce_version >= DCN_VERSION_1_0) {
if (context->bw.dcn.calc_clk.fclk_khz if (context->bw.dcn.calc_clk.fclk_khz
> dc->current_context->bw.dcn.cur_clk.fclk_khz) { > dc->current_context->bw.dcn.cur_clk.fclk_khz) {
struct dm_pp_clock_for_voltage_req clock; struct dm_pp_clock_for_voltage_req clock;
......
...@@ -84,6 +84,7 @@ bool dal_hw_factory_init( ...@@ -84,6 +84,7 @@ bool dal_hw_factory_init(
dal_hw_factory_dcn10_init(factory); dal_hw_factory_dcn10_init(factory);
return true; return true;
#endif #endif
default: default:
ASSERT_CRITICAL(false); ASSERT_CRITICAL(false);
return false; return false;
......
...@@ -80,6 +80,7 @@ bool dal_hw_translate_init( ...@@ -80,6 +80,7 @@ bool dal_hw_translate_init(
dal_hw_translate_dcn10_init(translate); dal_hw_translate_dcn10_init(translate);
return true; return true;
#endif #endif
default: default:
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return false; return false;
......
...@@ -88,10 +88,11 @@ struct i2caux *dal_i2caux_create( ...@@ -88,10 +88,11 @@ struct i2caux *dal_i2caux_create(
return dal_i2caux_dce100_create(ctx); return dal_i2caux_dce100_create(ctx);
case DCE_VERSION_12_0: case DCE_VERSION_12_0:
return dal_i2caux_dce120_create(ctx); return dal_i2caux_dce120_create(ctx);
#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
case DCN_VERSION_1_0: case DCN_VERSION_1_0:
return dal_i2caux_dcn10_create(ctx); return dal_i2caux_dcn10_create(ctx);
#endif #endif
default: default:
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment