diff options
author | Zhang Rui <rui.zhang@intel.com> | 2025-03-19 08:53:07 +0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2025-04-06 12:36:03 -0400 |
commit | f8b136ef2605c1bf62020462d10e35228760aa19 (patch) | |
tree | 3c1b1840129d9ee40687c364eae77769ec7bd22f | |
parent | 3ae8508663372b93c5556a887e96ed0ca5df0711 (diff) | |
download | linux-f8b136ef2605c1bf62020462d10e35228760aa19.tar.gz linux-f8b136ef2605c1bf62020462d10e35228760aa19.tar.bz2 linux-f8b136ef2605c1bf62020462d10e35228760aa19.zip |
tools/power turbostat: Restore GFX sysfs fflush() call
Do fflush() to discard the buffered data, before each read of the
graphics sysfs knobs.
Fixes: ba99a4fc8c24 ("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>
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 70e17d4ad9b6..c9a34c16c7a8 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -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: |