Skip to content

Commit

Permalink
tools/power turbostat: Restore GFX sysfs fflush() call
Browse files Browse the repository at this point in the history
Do fflush() to discard the buffered data, before each read of the
graphics sysfs knobs.

Fixes: ba99a4f ("tools/power turbostat: Remove unnecessary fflush() call")
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Zhang Rui authored and Len Brown committed Apr 6, 2025
1 parent 3ae8508 commit f8b136e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -6039,6 +6039,7 @@ int snapshot_graphics(int idx)
int retval;

rewind(gfx_info[idx].fp);
fflush(gfx_info[idx].fp);

switch (idx) {
case GFX_rc6:
Expand Down

0 comments on commit f8b136e

Please sign in to comment.