Skip to content

Commit f37f797

Browse files
ChunTao Tsoalexdeucher
authored andcommitted
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: Dennis Chan <dennis.chan@amd.com> Acked-by: Roman Li <roman.li@amd.com> Signed-off-by: ChunTao Tso <chuntao.tso@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 196107e commit f37f797

4 files changed

Lines changed: 57 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/dc/dc_types.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ enum replay_FW_Message_type {
10341034
Replay_Msg_Not_Support = -1,
10351035
Replay_Set_Timing_Sync_Supported,
10361036
Replay_Set_Residency_Frameupdate_Timer,
1037+
Replay_Set_Pseudo_VTotal,
10371038
};
10381039

10391040
union replay_error_status {
@@ -1089,6 +1090,10 @@ struct replay_settings {
10891090
uint16_t coasting_vtotal_table[PR_COASTING_TYPE_NUM];
10901091
/* Maximum link off frame count */
10911092
enum replay_link_off_frame_count_level link_off_frame_count_level;
1093+
/* Replay pseudo vtotal for abm + ips on full screen video which can improve ips residency */
1094+
uint16_t abm_with_ips_on_full_screen_video_pseudo_vtotal;
1095+
/* Replay last pseudo vtotal set to DMUB */
1096+
uint16_t last_pseudo_vtotal;
10921097
};
10931098

10941099
/* To split out "global" and "per-panel" config settings.

drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,6 +2895,10 @@ enum dmub_cmd_replay_type {
28952895
* Set Residency Frameupdate Timer.
28962896
*/
28972897
DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER = 6,
2898+
/**
2899+
* Set pseudo vtotal
2900+
*/
2901+
DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL = 7,
28982902
};
28992903

29002904
/**
@@ -3077,6 +3081,26 @@ struct dmub_cmd_replay_set_timing_sync_data {
30773081
uint8_t pad[2];
30783082
};
30793083

3084+
/**
3085+
* Data passed from driver to FW in a DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command.
3086+
*/
3087+
struct dmub_cmd_replay_set_pseudo_vtotal {
3088+
/**
3089+
* Panel Instance.
3090+
* Panel isntance to identify which replay_state to use
3091+
* Currently the support is only for 0 or 1
3092+
*/
3093+
uint8_t panel_inst;
3094+
/**
3095+
* Source Vtotal that Replay + IPS + ABM full screen video src vtotal
3096+
*/
3097+
uint16_t vtotal;
3098+
/**
3099+
* Explicit padding to 4 byte boundary.
3100+
*/
3101+
uint8_t pad;
3102+
};
3103+
30803104
/**
30813105
* Definition of a DMUB_CMD__SET_REPLAY_POWER_OPT command.
30823106
*/
@@ -3157,6 +3181,20 @@ struct dmub_rb_cmd_replay_set_timing_sync {
31573181
struct dmub_cmd_replay_set_timing_sync_data replay_set_timing_sync_data;
31583182
};
31593183

3184+
/**
3185+
* Definition of a DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command.
3186+
*/
3187+
struct dmub_rb_cmd_replay_set_pseudo_vtotal {
3188+
/**
3189+
* Command header.
3190+
*/
3191+
struct dmub_cmd_header header;
3192+
/**
3193+
* Definition of DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command.
3194+
*/
3195+
struct dmub_cmd_replay_set_pseudo_vtotal data;
3196+
};
3197+
31603198
/**
31613199
* Data passed from driver to FW in DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command.
31623200
*/
@@ -3208,6 +3246,10 @@ union dmub_replay_cmd_set {
32083246
* Definition of DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command data.
32093247
*/
32103248
struct dmub_cmd_replay_frameupdate_timer_data timer_data;
3249+
/**
3250+
* Definition of DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command data.
3251+
*/
3252+
struct dmub_cmd_replay_set_pseudo_vtotal pseudo_vtotal_data;
32113253
};
32123254

32133255
/**
@@ -4359,6 +4401,10 @@ union dmub_rb_cmd {
43594401
* Definition of a DMUB_CMD__REPLAY_SET_RESIDENCY_FRAMEUPDATE_TIMER command.
43604402
*/
43614403
struct dmub_rb_cmd_replay_set_frameupdate_timer replay_set_frameupdate_timer;
4404+
/**
4405+
* Definition of a DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL command.
4406+
*/
4407+
struct dmub_rb_cmd_replay_set_pseudo_vtotal replay_set_pseudo_vtotal;
43624408
};
43634409

43644410
/**

drivers/gpu/drm/amd/display/modules/power/power_helpers.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,11 @@ void set_replay_coasting_vtotal(struct dc_link *link,
980980
link->replay_settings.coasting_vtotal_table[type] = vtotal;
981981
}
982982

983+
void set_replay_ips_full_screen_video_src_vtotal(struct dc_link *link, uint16_t vtotal)
984+
{
985+
link->replay_settings.abm_with_ips_on_full_screen_video_pseudo_vtotal = vtotal;
986+
}
987+
983988
void calculate_replay_link_off_frame_count(struct dc_link *link,
984989
uint16_t vtotal, uint16_t htotal)
985990
{

drivers/gpu/drm/amd/display/modules/power/power_helpers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ void init_replay_config(struct dc_link *link, struct replay_config *pr_config);
5757
void set_replay_coasting_vtotal(struct dc_link *link,
5858
enum replay_coasting_vtotal_type type,
5959
uint16_t vtotal);
60+
void set_replay_ips_full_screen_video_src_vtotal(struct dc_link *link, uint16_t vtotal);
6061
void calculate_replay_link_off_frame_count(struct dc_link *link,
6162
uint16_t vtotal, uint16_t htotal);
6263

0 commit comments

Comments
 (0)