Commit f980579c authored by ChunTao Tso's avatar ChunTao Tso Committed by Alex Deucher

drm/amd/display: Replay + IPS + ABM in Full Screen VPB

[Why]
Because ABM will wait VStart to start getting histogram data,
 it will cause we can't enter IPS while full screnn video playing.

[How]
Modify the panel refresh rate to the maximun multiple of current
 refresh rate.
Reviewed-by: default avatarDennis Chan <dennis.chan@amd.com>
Acked-by: default avatarRoman Li <roman.li@amd.com>
Signed-off-by: default avatarChunTao Tso <chuntao.tso@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4516a793
...@@ -1034,6 +1034,7 @@ enum replay_FW_Message_type { ...@@ -1034,6 +1034,7 @@ enum replay_FW_Message_type {
Replay_Msg_Not_Support = -1, Replay_Msg_Not_Support = -1,
Replay_Set_Timing_Sync_Supported, Replay_Set_Timing_Sync_Supported,
Replay_Set_Residency_Frameupdate_Timer, Replay_Set_Residency_Frameupdate_Timer,
Replay_Set_Pseudo_VTotal,
}; };
union replay_error_status { union replay_error_status {
...@@ -1089,6 +1090,10 @@ struct replay_settings { ...@@ -1089,6 +1090,10 @@ struct replay_settings {
uint16_t coasting_vtotal_table[PR_COASTING_TYPE_NUM]; uint16_t coasting_vtotal_table[PR_COASTING_TYPE_NUM];
/* Maximum link off frame count */ /* Maximum link off frame count */
enum replay_link_off_frame_count_level link_off_frame_count_level; enum replay_link_off_frame_count_level link_off_frame_count_level;
/* Replay pseudo vtotal for abm + ips on full screen video which can improve ips residency */
uint16_t abm_with_ips_on_full_screen_video_pseudo_vtotal;
/* Replay last pseudo vtotal set to DMUB */
uint16_t last_pseudo_vtotal;
}; };
/* To split out "global" and "per-panel" config settings. /* To split out "global" and "per-panel" config settings.
......
...@@ -2895,6 +2895,10 @@ enum dmub_cmd_replay_type { ...@@ -2895,6 +2895,10 @@ enum dmub_cmd_replay_type {
* Set Residency Frameupdate Timer. * Set Residency Frameupdate Timer.
*/ */
DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER = 6, DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER = 6,
/**
* Set pseudo vtotal
*/
DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL = 7,
}; };
/** /**
...@@ -3077,6 +3081,26 @@ struct dmub_cmd_replay_set_timing_sync_data { ...@@ -3077,6 +3081,26 @@ struct dmub_cmd_replay_set_timing_sync_data {
uint8_t pad[2]; uint8_t pad[2];
}; };
/**
* Data passed from driver to FW in a DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command.
*/
struct dmub_cmd_replay_set_pseudo_vtotal {
/**
* Panel Instance.
* Panel isntance to identify which replay_state to use
* Currently the support is only for 0 or 1
*/
uint8_t panel_inst;
/**
* Source Vtotal that Replay + IPS + ABM full screen video src vtotal
*/
uint16_t vtotal;
/**
* Explicit padding to 4 byte boundary.
*/
uint8_t pad;
};
/** /**
* Definition of a DMUB_CMD__SET_REPLAY_POWER_OPT command. * Definition of a DMUB_CMD__SET_REPLAY_POWER_OPT command.
*/ */
...@@ -3157,6 +3181,20 @@ struct dmub_rb_cmd_replay_set_timing_sync { ...@@ -3157,6 +3181,20 @@ struct dmub_rb_cmd_replay_set_timing_sync {
struct dmub_cmd_replay_set_timing_sync_data replay_set_timing_sync_data; struct dmub_cmd_replay_set_timing_sync_data replay_set_timing_sync_data;
}; };
/**
* Definition of a DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command.
*/
struct dmub_rb_cmd_replay_set_pseudo_vtotal {
/**
* Command header.
*/
struct dmub_cmd_header header;
/**
* Definition of DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command.
*/
struct dmub_cmd_replay_set_pseudo_vtotal data;
};
/** /**
* Data passed from driver to FW in DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command. * Data passed from driver to FW in DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command.
*/ */
...@@ -3208,6 +3246,10 @@ union dmub_replay_cmd_set { ...@@ -3208,6 +3246,10 @@ union dmub_replay_cmd_set {
* Definition of DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command data. * Definition of DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command data.
*/ */
struct dmub_cmd_replay_frameupdate_timer_data timer_data; struct dmub_cmd_replay_frameupdate_timer_data timer_data;
/**
* Definition of DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command data.
*/
struct dmub_cmd_replay_set_pseudo_vtotal pseudo_vtotal_data;
}; };
/** /**
...@@ -4359,6 +4401,10 @@ union dmub_rb_cmd { ...@@ -4359,6 +4401,10 @@ union dmub_rb_cmd {
* Definition of a DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command. * Definition of a DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command.
*/ */
struct dmub_rb_cmd_replay_set_frameupdate_timer replay_set_frameupdate_timer; struct dmub_rb_cmd_replay_set_frameupdate_timer replay_set_frameupdate_timer;
/**
* Definition of a DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command.
*/
struct dmub_rb_cmd_replay_set_pseudo_vtotal replay_set_pseudo_vtotal;
}; };
/** /**
......
...@@ -980,6 +980,11 @@ void set_replay_coasting_vtotal(struct dc_link *link, ...@@ -980,6 +980,11 @@ void set_replay_coasting_vtotal(struct dc_link *link,
link->replay_settings.coasting_vtotal_table[type] = vtotal; link->replay_settings.coasting_vtotal_table[type] = vtotal;
} }
void set_replay_ips_full_screen_video_src_vtotal(struct dc_link *link, uint16_t vtotal)
{
link->replay_settings.abm_with_ips_on_full_screen_video_pseudo_vtotal = vtotal;
}
void calculate_replay_link_off_frame_count(struct dc_link *link, void calculate_replay_link_off_frame_count(struct dc_link *link,
uint16_t vtotal, uint16_t htotal) uint16_t vtotal, uint16_t htotal)
{ {
......
...@@ -57,6 +57,7 @@ void init_replay_config(struct dc_link *link, struct replay_config *pr_config); ...@@ -57,6 +57,7 @@ void init_replay_config(struct dc_link *link, struct replay_config *pr_config);
void set_replay_coasting_vtotal(struct dc_link *link, void set_replay_coasting_vtotal(struct dc_link *link,
enum replay_coasting_vtotal_type type, enum replay_coasting_vtotal_type type,
uint16_t vtotal); uint16_t vtotal);
void set_replay_ips_full_screen_video_src_vtotal(struct dc_link *link, uint16_t vtotal);
void calculate_replay_link_off_frame_count(struct dc_link *link, void calculate_replay_link_off_frame_count(struct dc_link *link,
uint16_t vtotal, uint16_t htotal); uint16_t vtotal, uint16_t htotal);
......
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