Skip to content

Commit f8b136e

Browse files
zhang-ruilenb
authored andcommitted
tools/power turbostat: Restore GFX sysfs fflush() call
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>
1 parent 3ae8508 commit f8b136e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6039,6 +6039,7 @@ int snapshot_graphics(int idx)
60396039
int retval;
60406040

60416041
rewind(gfx_info[idx].fp);
6042+
fflush(gfx_info[idx].fp);
60426043

60436044
switch (idx) {
60446045
case GFX_rc6:

0 commit comments

Comments
 (0)