Commit 37f4382b authored by Max Tseng's avatar Max Tseng Committed by Alex Deucher

drm/amd/display: replay: Augment Frameupdate Command

[Why]
Sending certain Frameupdate number for Replay Power Evaluation
Reviewed-by: default avatarDennis Chan <dennis.chan@amd.com>
Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarMax Tseng <max.tseng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 75a3371e
......@@ -1031,6 +1031,7 @@ enum replay_coasting_vtotal_type {
enum replay_FW_Message_type {
Replay_Msg_Not_Support = -1,
Replay_Set_Timing_Sync_Supported,
Replay_Set_Residency_Frameupdate_Timer,
};
union replay_error_status {
......
......@@ -46,7 +46,7 @@ struct dmub_replay_funcs {
void (*replay_set_power_opt)(struct dmub_replay *dmub, unsigned int power_opt,
uint8_t panel_inst);
void (*replay_send_cmd)(struct dmub_replay *dmub,
enum replay_FW_Message_type msg, unsigned int panel_inst, union dmub_replay_cmd_set *cmd_element);
enum replay_FW_Message_type msg, union dmub_replay_cmd_set *cmd_element);
void (*replay_set_coasting_vtotal)(struct dmub_replay *dmub, uint16_t coasting_vtotal,
uint8_t panel_inst);
void (*replay_residency)(struct dmub_replay *dmub,
......
......@@ -1023,10 +1023,16 @@ bool edp_send_replay_cmd(struct dc_link *link,
if (!replay)
return false;
if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
DC_LOGGER_INIT(link->ctx->logger);
if (dc_get_edp_link_panel_inst(dc, link, &panel_inst))
cmd_data->panel_inst = panel_inst;
else {
DC_LOG_DC("%s(): get edp panel inst fail ", __func__);
return false;
}
replay->funcs->replay_send_cmd(replay, msg, panel_inst, cmd_data);
replay->funcs->replay_send_cmd(replay, msg, cmd_data);
return true;
}
......
......@@ -2880,6 +2880,10 @@ enum dmub_cmd_replay_type {
* Set disabled iiming sync.
*/
DMUB_CMD__REPLAY_SET_TIMING_SYNC_SUPPORTED = 5,
/**
* Set Residency Frameupdate Timer.
*/
DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER = 6,
};
/**
......@@ -3143,14 +3147,57 @@ struct dmub_rb_cmd_replay_set_timing_sync {
struct dmub_cmd_replay_set_timing_sync_data replay_set_timing_sync_data;
};
/**
* Data passed from driver to FW in DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command.
*/
struct dmub_cmd_replay_frameupdate_timer_data {
/**
* Panel Instance.
* Panel isntance to identify which replay_state to use
* Currently the support is only for 0 or 1
*/
uint8_t panel_inst;
/**
* Replay Frameupdate Timer Enable or not
*/
uint8_t enable;
/**
* REPLAY force reflash frame update number
*/
uint16_t frameupdate_count;
};
/**
* Definition of DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER
*/
struct dmub_rb_cmd_replay_set_frameupdate_timer {
/**
* Command header.
*/
struct dmub_cmd_header header;
/**
* Definition of a DMUB_CMD__SET_REPLAY_POWER_OPT command.
*/
struct dmub_cmd_replay_frameupdate_timer_data data;
};
/**
* Definition union of replay command set
*/
union dmub_replay_cmd_set {
/**
* Panel Instance.
* Panel isntance to identify which replay_state to use
* Currently the support is only for 0 or 1
*/
uint8_t panel_inst;
/**
* Definition of DMUB_CMD__REPLAY_SET_TIMING_SYNC_SUPPORTED command data.
*/
struct dmub_cmd_replay_set_timing_sync_data sync_data;
/**
* Definition of DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command data.
*/
struct dmub_cmd_replay_frameupdate_timer_data timer_data;
};
/**
......@@ -4288,6 +4335,10 @@ union dmub_rb_cmd {
struct dmub_rb_cmd_replay_set_power_opt_and_coasting_vtotal replay_set_power_opt_and_coasting_vtotal;
struct dmub_rb_cmd_replay_set_timing_sync replay_set_timing_sync;
/**
* Definition of a DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command.
*/
struct dmub_rb_cmd_replay_set_frameupdate_timer replay_set_frameupdate_timer;
};
/**
......
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