]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/6.8.6/drm-amd-display-fix-nanosec-stat-overflow.patch
Linux 6.6.27
[thirdparty/kernel/stable-queue.git] / releases / 6.8.6 / drm-amd-display-fix-nanosec-stat-overflow.patch
1 From d2b9df484ac4cb1fc5e83707763dc669047919aa Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Thu, 29 Aug 2019 11:53:52 -0400
4 Subject: drm/amd/display: Fix nanosec stat overflow
5
6 From: Aric Cyr <aric.cyr@amd.com>
7
8 [ Upstream commit 14d68acfd04b39f34eea7bea65dda652e6db5bf6 ]
9
10 [Why]
11 Nanosec stats can overflow on long running systems potentially causing
12 statistic logging issues.
13
14 [How]
15 Use 64bit types for nanosec stats to ensure no overflow.
16
17 Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
18 Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
19 Signed-off-by: Aric Cyr <aric.cyr@amd.com>
20 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
21 Signed-off-by: Sasha Levin <sashal@kernel.org>
22 ---
23 drivers/gpu/drm/amd/display/modules/inc/mod_stats.h | 4 ++--
24 1 file changed, 2 insertions(+), 2 deletions(-)
25
26 diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h b/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h
27 index 5960dd760e91c..8ce6c22e5d041 100644
28 --- a/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h
29 +++ b/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h
30 @@ -57,10 +57,10 @@ void mod_stats_update_event(struct mod_stats *mod_stats,
31 unsigned int length);
32
33 void mod_stats_update_flip(struct mod_stats *mod_stats,
34 - unsigned long timestamp_in_ns);
35 + unsigned long long timestamp_in_ns);
36
37 void mod_stats_update_vupdate(struct mod_stats *mod_stats,
38 - unsigned long timestamp_in_ns);
39 + unsigned long long timestamp_in_ns);
40
41 void mod_stats_update_freesync(struct mod_stats *mod_stats,
42 unsigned int v_total_min,
43 --
44 2.43.0
45