mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
drm/amd/display: Remove duplicate HWSS interfaces
[Why] Some interface functions are defined in both the public and private HWSS interfaces, which can lead to confusion and runtime issues, therefore the duplicates should be eliminated. [How] - power_down should only be private, because it's only used within HWSS. - update_plane_addr should only be public, as it's used outside HWSS. Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Joshua Aberback <joshua.aberback@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
58ed441367
commit
8732594017
@ -3319,7 +3319,6 @@ static const struct hw_sequencer_funcs dce110_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dce110_private_funcs = {
|
||||
.init_pipes = init_pipes,
|
||||
.update_plane_addr = update_plane_addr,
|
||||
.set_input_transfer_func = dce110_set_input_transfer_func,
|
||||
.set_output_transfer_func = dce110_set_output_transfer_func,
|
||||
.power_down = dce110_power_down,
|
||||
|
@ -1696,10 +1696,10 @@ void dcn10_power_down_on_boot(struct dc *dc)
|
||||
if (edp_link && edp_link->link_enc->funcs->is_dig_enabled &&
|
||||
edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc) &&
|
||||
dc->hwseq->funcs.edp_backlight_control &&
|
||||
dc->hwss.power_down &&
|
||||
dc->hwseq->funcs.power_down &&
|
||||
dc->hwss.edp_power_control) {
|
||||
dc->hwseq->funcs.edp_backlight_control(edp_link, false);
|
||||
dc->hwss.power_down(dc);
|
||||
dc->hwseq->funcs.power_down(dc);
|
||||
dc->hwss.edp_power_control(edp_link, false);
|
||||
} else {
|
||||
for (i = 0; i < dc->link_count; i++) {
|
||||
@ -1707,8 +1707,8 @@ void dcn10_power_down_on_boot(struct dc *dc)
|
||||
|
||||
if (link->link_enc && link->link_enc->funcs->is_dig_enabled &&
|
||||
link->link_enc->funcs->is_dig_enabled(link->link_enc) &&
|
||||
dc->hwss.power_down) {
|
||||
dc->hwss.power_down(dc);
|
||||
dc->hwseq->funcs.power_down) {
|
||||
dc->hwseq->funcs.power_down(dc);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2913,7 +2913,7 @@ static void dcn10_update_dchubp_dpp(
|
||||
|
||||
hubp->power_gated = false;
|
||||
|
||||
hws->funcs.update_plane_addr(dc, pipe_ctx);
|
||||
dc->hwss.update_plane_addr(dc, pipe_ctx);
|
||||
|
||||
if (is_pipe_tree_visible(pipe_ctx))
|
||||
hubp->funcs->set_blank(hubp, false);
|
||||
|
@ -78,7 +78,6 @@ static const struct hw_sequencer_funcs dcn10_funcs = {
|
||||
.get_clock = dcn10_get_clock,
|
||||
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
|
||||
.calc_vupdate_position = dcn10_calc_vupdate_position,
|
||||
.power_down = dce110_power_down,
|
||||
.set_backlight_level = dce110_set_backlight_level,
|
||||
.set_abm_immediate_disable = dce110_set_abm_immediate_disable,
|
||||
.set_pipe = dce110_set_pipe,
|
||||
@ -92,7 +91,6 @@ static const struct hw_sequencer_funcs dcn10_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn10_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn10_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.program_pipe = dcn10_program_pipe,
|
||||
.update_mpcc = dcn10_update_mpcc,
|
||||
|
@ -1825,7 +1825,7 @@ static void dcn20_update_dchubp_dpp(
|
||||
params.subvp_save_surf_addr.subvp_index = pipe_ctx->subvp_index;
|
||||
hwss_subvp_save_surf_addr(¶ms);
|
||||
}
|
||||
hws->funcs.update_plane_addr(dc, pipe_ctx);
|
||||
dc->hwss.update_plane_addr(dc, pipe_ctx);
|
||||
}
|
||||
|
||||
if (pipe_ctx->update_flags.bits.enable)
|
||||
|
@ -105,7 +105,6 @@ static const struct hw_sequencer_funcs dcn20_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn20_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn20_set_input_transfer_func,
|
||||
|
@ -96,7 +96,6 @@ static const struct hw_sequencer_funcs dcn201_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn201_private_funcs = {
|
||||
.init_pipes = NULL,
|
||||
.update_plane_addr = dcn201_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn201_plane_atomic_disconnect,
|
||||
.program_pipe = dcn10_program_pipe,
|
||||
.update_mpcc = dcn201_update_mpcc,
|
||||
|
@ -93,7 +93,6 @@ static const struct hw_sequencer_funcs dcn21_funcs = {
|
||||
.exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state,
|
||||
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
|
||||
.calc_vupdate_position = dcn10_calc_vupdate_position,
|
||||
.power_down = dce110_power_down,
|
||||
.set_backlight_level = dcn21_set_backlight_level,
|
||||
.set_abm_immediate_disable = dcn21_set_abm_immediate_disable,
|
||||
.set_pipe = dcn21_set_pipe,
|
||||
@ -109,7 +108,6 @@ static const struct hw_sequencer_funcs dcn21_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn21_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn20_set_input_transfer_func,
|
||||
|
@ -731,10 +731,10 @@ void dcn30_init_hw(struct dc *dc)
|
||||
if (edp_link && edp_link->link_enc->funcs->is_dig_enabled &&
|
||||
edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc) &&
|
||||
dc->hwss.edp_backlight_control &&
|
||||
dc->hwss.power_down &&
|
||||
hws->funcs.power_down &&
|
||||
dc->hwss.edp_power_control) {
|
||||
dc->hwss.edp_backlight_control(edp_link, false);
|
||||
dc->hwss.power_down(dc);
|
||||
hws->funcs.power_down(dc);
|
||||
dc->hwss.edp_power_control(edp_link, false);
|
||||
} else {
|
||||
for (i = 0; i < dc->link_count; i++) {
|
||||
@ -742,8 +742,8 @@ void dcn30_init_hw(struct dc *dc)
|
||||
|
||||
if (link->link_enc->funcs->is_dig_enabled &&
|
||||
link->link_enc->funcs->is_dig_enabled(link->link_enc) &&
|
||||
dc->hwss.power_down) {
|
||||
dc->hwss.power_down(dc);
|
||||
hws->funcs.power_down) {
|
||||
hws->funcs.power_down(dc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,6 @@ static const struct hw_sequencer_funcs dcn30_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn30_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn30_set_input_transfer_func,
|
||||
|
@ -111,7 +111,6 @@ static const struct hw_sequencer_funcs dcn301_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn301_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn30_set_input_transfer_func,
|
||||
|
@ -98,7 +98,6 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
|
||||
.set_flip_control_gsl = dcn20_set_flip_control_gsl,
|
||||
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
|
||||
.calc_vupdate_position = dcn10_calc_vupdate_position,
|
||||
.power_down = dce110_power_down,
|
||||
.set_backlight_level = dcn21_set_backlight_level,
|
||||
.set_abm_immediate_disable = dcn21_set_abm_immediate_disable,
|
||||
.set_pipe = dcn21_set_pipe,
|
||||
@ -116,7 +115,6 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn31_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn30_set_input_transfer_func,
|
||||
|
@ -100,7 +100,6 @@ static const struct hw_sequencer_funcs dcn314_funcs = {
|
||||
.set_flip_control_gsl = dcn20_set_flip_control_gsl,
|
||||
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
|
||||
.calc_vupdate_position = dcn10_calc_vupdate_position,
|
||||
.power_down = dce110_power_down,
|
||||
.set_backlight_level = dcn21_set_backlight_level,
|
||||
.set_abm_immediate_disable = dcn21_set_abm_immediate_disable,
|
||||
.set_pipe = dcn21_set_pipe,
|
||||
@ -119,7 +118,6 @@ static const struct hw_sequencer_funcs dcn314_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn314_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn30_set_input_transfer_func,
|
||||
|
@ -901,10 +901,10 @@ void dcn32_init_hw(struct dc *dc)
|
||||
if (edp_link->link_enc->funcs->is_dig_enabled &&
|
||||
edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc) &&
|
||||
dc->hwss.edp_backlight_control &&
|
||||
dc->hwss.power_down &&
|
||||
hws->funcs.power_down &&
|
||||
dc->hwss.edp_power_control) {
|
||||
dc->hwss.edp_backlight_control(edp_link, false);
|
||||
dc->hwss.power_down(dc);
|
||||
hws->funcs.power_down(dc);
|
||||
dc->hwss.edp_power_control(edp_link, false);
|
||||
}
|
||||
}
|
||||
@ -914,8 +914,8 @@ void dcn32_init_hw(struct dc *dc)
|
||||
|
||||
if (link->link_enc->funcs->is_dig_enabled &&
|
||||
link->link_enc->funcs->is_dig_enabled(link->link_enc) &&
|
||||
dc->hwss.power_down) {
|
||||
dc->hwss.power_down(dc);
|
||||
hws->funcs.power_down) {
|
||||
hws->funcs.power_down(dc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,6 @@ static const struct hw_sequencer_funcs dcn32_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn32_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn32_set_input_transfer_func,
|
||||
|
@ -629,10 +629,10 @@ void dcn35_power_down_on_boot(struct dc *dc)
|
||||
if (edp_link && edp_link->link_enc->funcs->is_dig_enabled &&
|
||||
edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc) &&
|
||||
dc->hwseq->funcs.edp_backlight_control &&
|
||||
dc->hwss.power_down &&
|
||||
dc->hwseq->funcs.power_down &&
|
||||
dc->hwss.edp_power_control) {
|
||||
dc->hwseq->funcs.edp_backlight_control(edp_link, false);
|
||||
dc->hwss.power_down(dc);
|
||||
dc->hwseq->funcs.power_down(dc);
|
||||
dc->hwss.edp_power_control(edp_link, false);
|
||||
} else {
|
||||
for (i = 0; i < dc->link_count; i++) {
|
||||
@ -640,8 +640,8 @@ void dcn35_power_down_on_boot(struct dc *dc)
|
||||
|
||||
if (link->link_enc && link->link_enc->funcs->is_dig_enabled &&
|
||||
link->link_enc->funcs->is_dig_enabled(link->link_enc) &&
|
||||
dc->hwss.power_down) {
|
||||
dc->hwss.power_down(dc);
|
||||
dc->hwseq->funcs.power_down) {
|
||||
dc->hwseq->funcs.power_down(dc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,6 @@ static const struct hw_sequencer_funcs dcn35_funcs = {
|
||||
.set_flip_control_gsl = dcn20_set_flip_control_gsl,
|
||||
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
|
||||
.calc_vupdate_position = dcn10_calc_vupdate_position,
|
||||
.power_down = dce110_power_down,
|
||||
.set_backlight_level = dcn21_set_backlight_level,
|
||||
.set_abm_immediate_disable = dcn21_set_abm_immediate_disable,
|
||||
.set_pipe = dcn21_set_pipe,
|
||||
@ -128,7 +127,6 @@ static const struct hw_sequencer_funcs dcn35_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn35_private_funcs = {
|
||||
.init_pipes = dcn35_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn32_set_input_transfer_func,
|
||||
|
@ -100,7 +100,6 @@ static const struct hw_sequencer_funcs dcn351_funcs = {
|
||||
.set_flip_control_gsl = dcn20_set_flip_control_gsl,
|
||||
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
|
||||
.calc_vupdate_position = dcn10_calc_vupdate_position,
|
||||
.power_down = dce110_power_down,
|
||||
.set_backlight_level = dcn21_set_backlight_level,
|
||||
.set_abm_immediate_disable = dcn21_set_abm_immediate_disable,
|
||||
.set_pipe = dcn21_set_pipe,
|
||||
@ -127,7 +126,6 @@ static const struct hw_sequencer_funcs dcn351_funcs = {
|
||||
|
||||
static const struct hwseq_private_funcs dcn351_private_funcs = {
|
||||
.init_pipes = dcn35_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn32_set_input_transfer_func,
|
||||
|
@ -354,10 +354,10 @@ void dcn401_init_hw(struct dc *dc)
|
||||
if (edp_link->link_enc->funcs->is_dig_enabled &&
|
||||
edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc) &&
|
||||
dc->hwss.edp_backlight_control &&
|
||||
dc->hwss.power_down &&
|
||||
hws->funcs.power_down &&
|
||||
dc->hwss.edp_power_control) {
|
||||
dc->hwss.edp_backlight_control(edp_link, false);
|
||||
dc->hwss.power_down(dc);
|
||||
hws->funcs.power_down(dc);
|
||||
dc->hwss.edp_power_control(edp_link, false);
|
||||
}
|
||||
}
|
||||
@ -367,8 +367,8 @@ void dcn401_init_hw(struct dc *dc)
|
||||
|
||||
if (link->link_enc->funcs->is_dig_enabled &&
|
||||
link->link_enc->funcs->is_dig_enabled(link->link_enc) &&
|
||||
dc->hwss.power_down) {
|
||||
dc->hwss.power_down(dc);
|
||||
hws->funcs.power_down) {
|
||||
hws->funcs.power_down(dc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -99,12 +99,10 @@ static const struct hw_sequencer_funcs dcn401_funcs = {
|
||||
.fams2_global_control_lock = dcn401_fams2_global_control_lock,
|
||||
.fams2_update_config = dcn401_fams2_update_config,
|
||||
.fams2_global_control_lock_fast = dcn401_fams2_global_control_lock_fast,
|
||||
.power_down = dce110_power_down,
|
||||
};
|
||||
|
||||
static const struct hwseq_private_funcs dcn401_private_funcs = {
|
||||
.init_pipes = dcn10_init_pipes,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
.plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
|
||||
.update_mpcc = dcn20_update_mpcc,
|
||||
.set_input_transfer_func = dcn32_set_input_transfer_func,
|
||||
|
@ -240,7 +240,6 @@ struct hw_sequencer_funcs {
|
||||
void (*program_triplebuffer)(const struct dc *dc,
|
||||
struct pipe_ctx *pipe_ctx, bool enableTripleBuffer);
|
||||
void (*update_pending_status)(struct pipe_ctx *pipe_ctx);
|
||||
void (*power_down)(struct dc *dc);
|
||||
void (*update_dsc_pg)(struct dc *dc, struct dc_state *context, bool safe_to_disable);
|
||||
|
||||
/* Pipe Lock Related */
|
||||
|
@ -76,8 +76,6 @@ struct hwseq_private_funcs {
|
||||
void (*enable_stream_gating)(struct dc *dc, struct pipe_ctx *pipe_ctx);
|
||||
void (*init_pipes)(struct dc *dc, struct dc_state *context);
|
||||
void (*reset_hw_ctx_wrap)(struct dc *dc, struct dc_state *context);
|
||||
void (*update_plane_addr)(const struct dc *dc,
|
||||
struct pipe_ctx *pipe_ctx);
|
||||
void (*plane_atomic_disconnect)(struct dc *dc,
|
||||
struct dc_state *state,
|
||||
struct pipe_ctx *pipe_ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user