summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2025-03-19 08:53:07 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:42 +0200
commit727d331fd8de76510c4fa11df845307125cbc736 (patch)
tree81a8406a22ab8d2a47fad283c7198a54cb6d73e7 /tools
parentd54f0fa0e0e167dfd7f1b270a9b09a9514ec09bb (diff)
downloadlinux-727d331fd8de76510c4fa11df845307125cbc736.tar.gz
linux-727d331fd8de76510c4fa11df845307125cbc736.tar.bz2
linux-727d331fd8de76510c4fa11df845307125cbc736.zip
tools/power turbostat: Restore GFX sysfs fflush() call
[ Upstream commit f8b136ef2605c1bf62020462d10e35228760aa19 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/power/x86/turbostat/turbostat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 5b36f1fd885c..4155d9bfcfc6 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: