Skip to content

Commit

Permalink
drm/amd/display: Fix nanosec stat overflow
Browse files Browse the repository at this point in the history
[ Upstream commit 14d68ac ]

[Why]
Nanosec stats can overflow on long running systems potentially causing
statistic logging issues.

[How]
Use 64bit types for nanosec stats to ensure no overflow.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
AMD-aric authored and gregkh committed Apr 13, 2024
1 parent 27ccb0d commit fc04b1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/display/modules/inc/mod_stats.h
Expand Up @@ -57,10 +57,10 @@ void mod_stats_update_event(struct mod_stats *mod_stats,
unsigned int length);

void mod_stats_update_flip(struct mod_stats *mod_stats,
unsigned long timestamp_in_ns);
unsigned long long timestamp_in_ns);

void mod_stats_update_vupdate(struct mod_stats *mod_stats,
unsigned long timestamp_in_ns);
unsigned long long timestamp_in_ns);

void mod_stats_update_freesync(struct mod_stats *mod_stats,
unsigned int v_total_min,
Expand Down

0 comments on commit fc04b1b

Please sign in to comment.