mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
drm/amd/display: Refactor for Replay Link off frame count
[why] To refine for link off frame count in diagnose tool, the driver show the link off frame count number instead of showing link off frame count level. Reviewed-by: ChunTao Tso <chuntao.tso@amd.com> Reviewed-by: Robin Chen <robin.chen@amd.com> Acked-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Dennis Chan <dennis.chan@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
02fb803db1
commit
69925c0036
|
|
@ -1092,7 +1092,7 @@ struct replay_settings {
|
|||
/* Coasting vtotal table */
|
||||
uint32_t coasting_vtotal_table[PR_COASTING_TYPE_NUM];
|
||||
/* Maximum link off frame count */
|
||||
enum replay_link_off_frame_count_level link_off_frame_count_level;
|
||||
uint32_t link_off_frame_count;
|
||||
/* 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 */
|
||||
|
|
|
|||
|
|
@ -994,16 +994,12 @@ void calculate_replay_link_off_frame_count(struct dc_link *link,
|
|||
max_deviation_line = link->dpcd_caps.pr_info.max_deviation_line;
|
||||
pixel_deviation_per_line = link->dpcd_caps.pr_info.pixel_deviation_per_line;
|
||||
|
||||
if (htotal != 0 && vtotal != 0)
|
||||
if (htotal != 0 && vtotal != 0 && pixel_deviation_per_line != 0)
|
||||
max_link_off_frame_count = htotal * max_deviation_line / (pixel_deviation_per_line * vtotal);
|
||||
else
|
||||
ASSERT(0);
|
||||
|
||||
link->replay_settings.link_off_frame_count_level =
|
||||
max_link_off_frame_count >= PR_LINK_OFF_FRAME_COUNT_BEST ? PR_LINK_OFF_FRAME_COUNT_BEST :
|
||||
max_link_off_frame_count >= PR_LINK_OFF_FRAME_COUNT_GOOD ? PR_LINK_OFF_FRAME_COUNT_GOOD :
|
||||
PR_LINK_OFF_FRAME_COUNT_FAIL;
|
||||
|
||||
link->replay_settings.link_off_frame_count = max_link_off_frame_count;
|
||||
}
|
||||
|
||||
bool fill_custom_backlight_caps(unsigned int config_no, struct dm_acpi_atif_backlight_caps *caps)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user