drm/amd/display: fix bug with index check
authorAnthony Koo <Anthony.Koo@amd.com>
Fri, 27 Apr 2018 19:23:23 +0000 (15:23 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 18 May 2018 21:08:28 +0000 (16:08 -0500)
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/stats/stats.c

index 4b00bae..fe9e4b3 100644 (file)
@@ -305,7 +305,7 @@ void mod_stats_update_event(struct mod_stats *mod_stats,
 
        core_stats = MOD_STATS_TO_CORE(mod_stats);
 
-       if (core_stats->index >= core_stats->entries)
+       if (core_stats->event_index >= core_stats->event_entries)
                return;
 
        events = core_stats->events;