lkml.org 
[lkml]   [2024]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 11/23] drm/amd/display: Fix nanosec stat overflow
    Date
    From: Aric Cyr <aric.cyr@amd.com>

    [ Upstream commit 14d68acfd04b39f34eea7bea65dda652e6db5bf6 ]

    [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>
    ---
    drivers/gpu/drm/amd/display/modules/inc/mod_stats.h | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h b/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h
    index 3812094b52e8f..88b312c3eb43a 100644
    --- a/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h
    +++ b/drivers/gpu/drm/amd/display/modules/inc/mod_stats.h
    @@ -51,10 +51,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,
    --
    2.43.0

    \
     
     \ /
      Last update: 2024-05-27 16:15    [W:4.197 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site