[PATCH 21/25] drm/amd/display: fix bug with index check

Harry Wentland harry.wentland at amd.com
Tue May 8 17:10:37 UTC 2018


From: Anthony Koo <Anthony.Koo at amd.com>

Signed-off-by: Anthony Koo <Anthony.Koo at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <harry.wentland at amd.com>
---
 drivers/gpu/drm/amd/display/modules/stats/stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/modules/stats/stats.c b/drivers/gpu/drm/amd/display/modules/stats/stats.c
index 4b00bae725b9..fe9e4b316d3a 100644
--- a/drivers/gpu/drm/amd/display/modules/stats/stats.c
+++ b/drivers/gpu/drm/amd/display/modules/stats/stats.c
@@ -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;
-- 
2.17.0



More information about the amd-gfx mailing list