Skip to content

Commit 7d8a4bf

Browse files
Jack Changalexdeucher
authored andcommitted
drm/amd/display: Add replay desync error count tracking and reset functionality
[Why & How] Build-up get/reset desync error count interface and implement the functions. Reviewed-by: ChunTao Tso <[email protected]> Reviewed-by: Robin Chen <[email protected]> Signed-off-by: Jack Chang <[email protected]> Signed-off-by: Tom Chung <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 59fb2d0 commit 7d8a4bf

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,8 @@ struct replay_settings {
11471147
uint16_t abm_with_ips_on_full_screen_video_pseudo_vtotal;
11481148
/* Replay last pseudo vtotal set to DMUB */
11491149
uint16_t last_pseudo_vtotal;
1150+
/* Replay desync error */
1151+
uint32_t replay_desync_error_fail_count;
11501152
};
11511153

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

drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ static void handle_hpd_irq_replay_sink(struct dc_link *link)
239239
&replay_configuration.raw,
240240
sizeof(replay_configuration.raw));
241241

242+
/* Update desync error counter */
243+
link->replay_settings.replay_desync_error_fail_count++;
244+
242245
/* Acknowledge and clear error bits */
243246
dm_helpers_dp_write_dpcd(
244247
link->ctx,

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,3 +1039,8 @@ bool fill_custom_backlight_caps(unsigned int config_no, struct dm_acpi_atif_back
10391039
memcpy(caps->data_points, custom_backlight_profiles[config_no].data_points, data_points_size);
10401040
return true;
10411041
}
1042+
1043+
void reset_replay_dsync_error_count(struct dc_link *link)
1044+
{
1045+
link->replay_settings.replay_desync_error_fail_count = 0;
1046+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,5 @@ bool psr_su_set_dsc_slice_height(struct dc *dc, struct dc_link *link,
7878

7979
bool fill_custom_backlight_caps(unsigned int config_no,
8080
struct dm_acpi_atif_backlight_caps *caps);
81+
void reset_replay_dsync_error_count(struct dc_link *link);
8182
#endif /* MODULES_POWER_POWER_HELPERS_H_ */

0 commit comments

Comments
 (0)